Remove reuse_or_mk_region
.
It's not used on any hot paths, and so has little perf benefit, and it interferes with the optimizations in the following commits.
This commit is contained in:
parent
6e0115778b
commit
7439028374
5 changed files with 4 additions and 11 deletions
|
@ -363,7 +363,7 @@ impl<'cx, 'tcx> TypeFolder<TyCtxt<'tcx>> for Canonicalizer<'cx, 'tcx> {
|
|||
opportunistically resolved to {:?}",
|
||||
vid, resolved_vid
|
||||
);
|
||||
let r = self.tcx.reuse_or_mk_region(r, ty::ReVar(resolved_vid));
|
||||
let r = self.tcx.mk_region(ty::ReVar(resolved_vid));
|
||||
self.canonicalize_mode.canonicalize_free_region(self, r)
|
||||
}
|
||||
|
||||
|
|
|
@ -651,7 +651,7 @@ impl<'tcx> RegionConstraintCollector<'_, 'tcx> {
|
|||
let unified_region = self.unification_table().probe_value(rid);
|
||||
unified_region.0.unwrap_or_else(|| {
|
||||
let root = self.unification_table().find(rid).vid;
|
||||
tcx.reuse_or_mk_region(region, ty::ReVar(root))
|
||||
tcx.mk_region(ty::ReVar(root))
|
||||
})
|
||||
}
|
||||
_ => region,
|
||||
|
|
|
@ -95,7 +95,7 @@ impl<'a, 'tcx> TypeFolder<TyCtxt<'tcx>> for OpportunisticRegionResolver<'a, 'tcx
|
|||
.borrow_mut()
|
||||
.unwrap_region_constraints()
|
||||
.opportunistic_resolve_var(rid);
|
||||
TypeFolder::interner(self).reuse_or_mk_region(r, ty::ReVar(resolved))
|
||||
TypeFolder::interner(self).mk_region(ty::ReVar(resolved))
|
||||
}
|
||||
_ => r,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue