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...
This commit is contained in:
commit
b7fadfddcb
@ -1841,14 +1841,6 @@ fn add_bounds(set: &mut Set1<hir::LifetimeName>, bounds: &[hir::GenericBound<'_>
|
||||
}
|
||||
|
||||
impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
|
||||
// FIXME(#37666) this works around a limitation in the region inferencer
|
||||
fn hack<F>(&mut self, f: F)
|
||||
where
|
||||
F: for<'b> FnOnce(&mut LifetimeContext<'b, 'tcx>),
|
||||
{
|
||||
f(self)
|
||||
}
|
||||
|
||||
fn with<F>(&mut self, wrap_scope: Scope<'_>, f: F)
|
||||
where
|
||||
F: for<'b> FnOnce(ScopeRef<'_>, &mut LifetimeContext<'b, 'tcx>),
|
||||
@ -2252,7 +2244,7 @@ fn visit_early_late<F>(
|
||||
};
|
||||
self.with(scope, move |old_scope, this| {
|
||||
this.check_lifetime_params(old_scope, &generics.params);
|
||||
this.hack(walk); // FIXME(#37666) workaround in place of `walk(this)`
|
||||
walk(this);
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user