Skip to content

Commit 3b36795

Browse files
Rollup merge of #86103 - camsteffen:lifetime-hack, r=jackh726
Remove lifetime hack It compiles without the hack. But I don't know why. I can't get the example in the referenced issue to compile...
2 parents 89b5e8f + fb92c92 commit 3b36795

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

compiler/rustc_resolve/src/late/lifetimes.rs

+1-9
Original file line numberDiff line numberDiff line change
@@ -1841,14 +1841,6 @@ fn object_lifetime_defaults_for_item(
18411841
}
18421842

18431843
impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
1844-
// FIXME(#37666) this works around a limitation in the region inferencer
1845-
fn hack<F>(&mut self, f: F)
1846-
where
1847-
F: for<'b> FnOnce(&mut LifetimeContext<'b, 'tcx>),
1848-
{
1849-
f(self)
1850-
}
1851-
18521844
fn with<F>(&mut self, wrap_scope: Scope<'_>, f: F)
18531845
where
18541846
F: for<'b> FnOnce(ScopeRef<'_>, &mut LifetimeContext<'b, 'tcx>),
@@ -2252,7 +2244,7 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
22522244
};
22532245
self.with(scope, move |old_scope, this| {
22542246
this.check_lifetime_params(old_scope, &generics.params);
2255-
this.hack(walk); // FIXME(#37666) workaround in place of `walk(this)`
2247+
walk(this);
22562248
});
22572249
}
22582250

0 commit comments

Comments
 (0)