-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deny hashing ty/re/ct inference variables #103220
Conversation
@@ -1,22 +1,23 @@ | |||
error[E0521]: borrowed data escapes outside of associated function | |||
--> $DIR/issue-72312.rs:12:9 | |||
--> $DIR/issue-72312.rs:12:24 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This UI test changes its output because we used to sort ClosureOutlivesRequirement
s by Option<Ty<'tcx>>
but now sort by Location
, thus we now use the span of the first location in the body, which corresponds to the innermost call.
I don't think this is necessarily an issue, though. The error is more readable, imo.
This comment has been minimized.
This comment has been minimized.
cac1fb7
to
547b8bd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the same should hold for const infer vars
let stable_hash = if flags.flags.intersects(TypeFlags::HAS_RE_INFER) | ||
let stable_hash = if flags | ||
.flags | ||
.intersects(TypeFlags::HAS_RE_INFER | TypeFlags::HAS_TY_INFER) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.intersects(TypeFlags::HAS_RE_INFER | TypeFlags::HAS_TY_INFER) | |
.intersects(TypeFlags::HAS_RE_INFER | TypeFlags::HAS_TY_INFER | TypeFlags::HAS_CT_INFER) |
once we also forbid const infer vars r=me |
☔ The latest upstream changes (presumably #103228) made this pull request unmergeable. Please resolve the merge conflicts. |
06164fa
to
6b0ef9c
Compare
@bors r=lcnr rollup=iffy |
☀️ Test successful - checks-actions |
Finished benchmarking commit (4b3b731): comparison URL. Overall result: ❌✅ regressions and improvements - ACTION NEEDEDNext Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Footnotes |
I have no idea why this would introduce a regression 🤔 |
The perf changes are small and the wins balance out the losses. No need to stress on this one, I think. @rustbot label: +perf-regression-triaged |
…gillot Don't carry MIR location in `ConstraintCategory::CallArgument` It turns out that `ConstraintCategory::CallArgument` cannot just carry a MIR location in it, since we may bubble them up to totally different MIR bodies. So instead, revert the commit a6b5f95, and instead just erase regions from the original `Option<Ty<'tcx>>` that it carried, so that it doesn't ICE with the changes in rust-lang#103220. Best reviewed in parts -- the first is just a revert, and the second is where the meaningful changes happen. Fixes rust-lang#103624
…gillot Don't carry MIR location in `ConstraintCategory::CallArgument` It turns out that `ConstraintCategory::CallArgument` cannot just carry a MIR location in it, since we may bubble them up to totally different MIR bodies. So instead, revert the commit a6b5f95, and instead just erase regions from the original `Option<Ty<'tcx>>` that it carried, so that it doesn't ICE with the changes in rust-lang#103220. Best reviewed in parts -- the first is just a revert, and the second is where the meaningful changes happen. Fixes rust-lang#103624
Deny hashing ty/re/ct inference variables cc `@cjgillot` and rust-lang#102695 (comment) r? `@lcnr` best reviewed one commit at a time, mostly because the second commit that fixes `ClosureOutlivesRequirement` is mostly noise because of losing its `<'tcx>` lifetime parameter.
cc @cjgillot and #102695 (comment)
r? @lcnr
best reviewed one commit at a time, mostly because the second commit that fixes
ClosureOutlivesRequirement
is mostly noise because of losing its<'tcx>
lifetime parameter.