borrowck: Keep returned path from best_blame_constraint() consistent#158877
Conversation
The function `fn best_blame_constraint()` returns a `Vec<OutlivesConstraint>` and a `BlameConstraint`. The `BlameConstraint` is really just a slimmed down version of an `OutlivesConstraint`. So we can remove `BlameConstraint` entirely and instead return `Vec<OutlivesConstraint>` and an index into that `Vec`. (Encapsulated in a struct for nice ergonomics.) To prepare for that, change the code to adjust `Vec<OutlivesConstraint>` in-place and return info about the adjusted element, rather than returning info for a newly created "fake" `OutlivesConstraint`.
|
r? @fee1-dead rustbot has assigned @fee1-dead. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
@bors r+ rollup |
…nt, r=fee1-dead borrowck: Keep returned `path` from `best_blame_constraint()` consistent The function `fn best_blame_constraint()` returns a `Vec<OutlivesConstraint>` and a `BlameConstraint`. The `BlameConstraint` is really just a slimmed down version of an `OutlivesConstraint`. So we can remove `BlameConstraint` entirely and instead return `Vec<OutlivesConstraint>` and an index into that `Vec`. (Encapsulated in a struct for nice ergonomics.) To prepare for that, change the code to adjust `Vec<OutlivesConstraint>` in-place and return info about the adjusted element, rather than returning info for a newly created "fake" `OutlivesConstraint`. It is slightly sad that we make `path` `mut`, but I think we can live with that. Diagnostics tests will surely catch if someone messes up because of that. This takes us one step closer (this is commit 2 of 4) towards the end result illustrated in rust-lang#158623.
…uwer Rollup of 24 pull requests Successful merges: - #150946 (intrinsics: Add a fallback for non-const libm float functions) - #158510 (Enable `static_position_independent_executables` on all gnu and musl targets) - #158541 (Move `std::io::Write` to `core::io`) - #158899 (Fix `unaligned_volatile_store` by removing `MemFlags::UNALIGNED`) - #156027 (Consider captured regions for opaque type region liveness.) - #156370 (Reject linked dylib EII default overrides) - #156508 (Infer all anonymous lifetimes in assoc consts as `'static`) - #157561 (rustdoc: do not include extra stuff in span) - #158617 (allow mGCA const arguments to fall back to anon consts) - #158645 (Fix splat ICEs and ban it in closures) - #158859 (Improve `-Zls` diagnostic message on `.rs` files) - #158988 (Redo `TokenStreamIter`) - #158347 (Improve generic parameters handling for #[diagnostic::on_const]) - #158384 (Allow BackwardIncompatibleDropHint in polonius legacy) - #158722 (delegation: do not always inherit `ConstArgHasType` predicates) - #158739 (view-types: HIR lowering) - #158877 (borrowck: Keep returned `path` from `best_blame_constraint()` consistent) - #158883 (tests: fix enum-match.rs to handle LLVM 23) - #158886 (Add documentation for the `no_std` attribute) - #158940 (Implement feature `char_to_u32`) - #158951 (Merge three `MaxUniverse`s into one) - #158961 (Reapply "LLVM 23: Run AssignGUIDPass in some places") - #158995 (Use REST API in linkchecker script) - #158996 ([compiler] Implement `PartialOrd` via `Ord` for `Span` and newtype_indexes)
…nt, r=fee1-dead borrowck: Keep returned `path` from `best_blame_constraint()` consistent The function `fn best_blame_constraint()` returns a `Vec<OutlivesConstraint>` and a `BlameConstraint`. The `BlameConstraint` is really just a slimmed down version of an `OutlivesConstraint`. So we can remove `BlameConstraint` entirely and instead return `Vec<OutlivesConstraint>` and an index into that `Vec`. (Encapsulated in a struct for nice ergonomics.) To prepare for that, change the code to adjust `Vec<OutlivesConstraint>` in-place and return info about the adjusted element, rather than returning info for a newly created "fake" `OutlivesConstraint`. It is slightly sad that we make `path` `mut`, but I think we can live with that. Diagnostics tests will surely catch if someone messes up because of that. This takes us one step closer (this is commit 2 of 4) towards the end result illustrated in rust-lang#158623.
Rollup of 24 pull requests Successful merges: - #150946 (intrinsics: Add a fallback for non-const libm float functions) - #158541 (Move `std::io::Write` to `core::io`) - #156027 (Consider captured regions for opaque type region liveness.) - #156370 (Reject linked dylib EII default overrides) - #156508 (Infer all anonymous lifetimes in assoc consts as `'static`) - #157561 (rustdoc: do not include extra stuff in span) - #158617 (allow mGCA const arguments to fall back to anon consts) - #158645 (Fix splat ICEs and ban it in closures) - #158859 (Improve `-Zls` diagnostic message on `.rs` files) - #158988 (Redo `TokenStreamIter`) - #158347 (Improve generic parameters handling for #[diagnostic::on_const]) - #158384 (Allow BackwardIncompatibleDropHint in polonius legacy) - #158722 (delegation: do not always inherit `ConstArgHasType` predicates) - #158739 (view-types: HIR lowering) - #158877 (borrowck: Keep returned `path` from `best_blame_constraint()` consistent) - #158883 (tests: fix enum-match.rs to handle LLVM 23) - #158886 (Add documentation for the `no_std` attribute) - #158940 (Implement feature `char_to_u32`) - #158951 (Merge three `MaxUniverse`s into one) - #158960 (Fix bootstrap submodule path prefix matching) - #158961 (Reapply "LLVM 23: Run AssignGUIDPass in some places") - #158995 (Use REST API in linkchecker script) - #158996 ([compiler] Implement `PartialOrd` via `Ord` for `Span` and newtype_indexes) - #159036 (bootstrap: expand '@argfile' arguments to rustc shim)
Rollup merge of #158877 - Enselic:adjust-best_blame_constraint, r=fee1-dead borrowck: Keep returned `path` from `best_blame_constraint()` consistent The function `fn best_blame_constraint()` returns a `Vec<OutlivesConstraint>` and a `BlameConstraint`. The `BlameConstraint` is really just a slimmed down version of an `OutlivesConstraint`. So we can remove `BlameConstraint` entirely and instead return `Vec<OutlivesConstraint>` and an index into that `Vec`. (Encapsulated in a struct for nice ergonomics.) To prepare for that, change the code to adjust `Vec<OutlivesConstraint>` in-place and return info about the adjusted element, rather than returning info for a newly created "fake" `OutlivesConstraint`. It is slightly sad that we make `path` `mut`, but I think we can live with that. Diagnostics tests will surely catch if someone messes up because of that. This takes us one step closer (this is commit 2 of 4) towards the end result illustrated in #158623.
|
@rust-timer build a98949b |
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (a98949b): comparison URL. Overall result: ❌✅ regressions and improvements - please read:Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf. Next, please: If you can, justify the regressions found in this try perf run in writing along with @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary -3.6%, secondary -2.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary -0.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 490.768s -> 492.209s (0.29%) |
|
@rustbot label: +perf-regression-triaged |
The function
fn best_blame_constraint()returns aVec<OutlivesConstraint>and aBlameConstraint. TheBlameConstraintis really just a slimmed down version of anOutlivesConstraint. So we can removeBlameConstraintentirely and instead returnVec<OutlivesConstraint>and an index into thatVec. (Encapsulated in a struct for nice ergonomics.)To prepare for that, change the code to adjust
Vec<OutlivesConstraint>in-place and return info about the adjusted element, rather than returning info for a newly created "fake"OutlivesConstraint.It is slightly sad that we make
pathmut, but I think we can live with that. Diagnostics tests will surely catch if someone messes up because of that.This takes us one step closer (this is commit 2 of 4) towards the end result illustrated in #158623.