-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
remove obsolete givens
from regionck
#107376
Conversation
This comment has been minimized.
This comment has been minimized.
is this still blocked on #105982 now? |
Nope. |
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.
r=me after dealing with the comments
also, this now fixes #106567 i think edit: as you've said in the previous comment. please add that to the description
// of *every* relationship that arises here, | ||
// but presently we do not.) | ||
if r_a.is_free_or_static() && r_b.is_free() { | ||
self.region_relation.add(r_a, r_b) |
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.
can you still make this an exhaustive match on r_a
?
match *r { | ||
ty::ReVar(_) if self.resolve_to_universal => self | ||
.infcx | ||
.inner | ||
.borrow_mut() | ||
.unwrap_region_constraints() | ||
.opportunistic_resolve_region(TypeFolder::tcx(self), r), |
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.
cna we always use opportunistic_resolve_region
here?
@rustbot author |
☔ The latest upstream changes (presumably #108096) made this pull request unmergeable. Please resolve the merge conflicts. |
always resolve to universal regions if possible `RegionConstraintCollector::opportunistic_resolve_var`, which is used in canonicalization and projection logic, doesn't resolve the region var to an equal universal region. So if we have equated `'static == '1 == '2`, it doesn't resolve `'1` or `'2` to `'static`. Now it does! Addresses review comment rust-lang#107376 (comment). r? `@lcnr`
☀️ Test successful - checks-actions |
Finished benchmarking commit (e84e5ff): 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 Warning ⚠: The following benchmark(s) failed to build:
cc @rust-lang/wg-compiler-performance 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.
|
@@ -52,6 +53,10 @@ impl<'a, 'tcx: 'a> InferCtxtExt<'a, 'tcx> for InferCtxt<'tcx> { | |||
body_id: LocalDefId, | |||
ty: Ty<'tcx>, | |||
) -> Vec<OutlivesBound<'tcx>> { | |||
let ty = self.resolve_vars_if_possible(ty); | |||
let ty = OpportunisticRegionResolver::new(self).fold_ty(ty); |
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.
is it still needed to fold twice here?
This PR broke compilation of
|
@aliemjay can you look into that breakage and whether that's something we can quickly fix? otherwise we should probably revert this 🤔 |
I've prepared a draft revert just in case in #109183, and the pub trait MapAccess {
type Error;
fn next_key_seed(&mut self) -> Option<Self::Error>;
}
struct Access<'a> {
_marker: std::marker::PhantomData<&'a ()>,
}
impl<'a, 'b: 'a> MapAccess for Access<'a> {
type Error = ();
fn next_key_seed(&mut self) -> Option<Self::Error> {
unimplemented!()
}
} Feel free to close the revert PR if we can land the fix soon. It may be a simple fix since the update: the revert is now in the bors queue. |
Revert rust-lang#107376 to fix potential `bincode` breakage and `rustc-perf` benchmark. rust-lang#107376 caused `rustc-perf`'s `webrender` benchmark to break, by regressing on the `bincode-1.3.3` crate. ~~This PR is a draft revert in case we can't land a fix soon enough, and we'd like to land the revert instead~~ (Though I myself think it'd be safer to do the revert, and run crater when relanding rust-lang#107376.) cc `@aliemjay`
Revert rust-lang#107376 to fix potential `bincode` breakage and `rustc-perf` benchmark. rust-lang#107376 caused `rustc-perf`'s `webrender` benchmark to break, by regressing on the `bincode-1.3.3` crate. ~~This PR is a draft revert in case we can't land a fix soon enough, and we'd like to land the revert instead~~ (Though I myself think it'd be safer to do the revert, and run crater when relanding rust-lang#107376.) cc `@aliemjay`
@rustbot label: +perf-regression-triaged |
remove obsolete `givens` from regionck Revives rust-lang#107376. The only change is the last commit (rust-lang@2a3177a) which should fix the regression. Fixes rust-lang#106567 r? `@lcnr`
Fixes #106567
r? @lcnr (feel free to reassign)