resolve to universal regions when possible
This commit is contained in:
parent
13471d3b20
commit
f3dfa52fd1
4 changed files with 19 additions and 38 deletions
|
@ -871,12 +871,12 @@ impl<'tcx> TypeFolder<TyCtxt<'tcx>> for PlaceholderReplacer<'_, 'tcx> {
|
|||
|
||||
fn fold_region(&mut self, r0: ty::Region<'tcx>) -> ty::Region<'tcx> {
|
||||
let r1 = match *r0 {
|
||||
ty::ReVar(_) => self
|
||||
ty::ReVar(vid) => self
|
||||
.infcx
|
||||
.inner
|
||||
.borrow_mut()
|
||||
.unwrap_region_constraints()
|
||||
.opportunistic_resolve_region(self.infcx.tcx, r0),
|
||||
.opportunistic_resolve_var(self.infcx.tcx, vid),
|
||||
_ => r0,
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue