Auto merge of #108020 - nnethercote:opt-mk_region, r=compiler-errors
Optimize `mk_region` PR #107869 avoiding some interning under `mk_ty` by special-casing `Ty` variants with simple (integer) bodies. This PR does something similar for regions. r? `@compiler-errors`
This commit is contained in:
@@ -1093,7 +1093,7 @@ impl<'tcx> InferCtxt<'tcx> {
|
||||
) -> ty::Region<'tcx> {
|
||||
let region_var =
|
||||
self.inner.borrow_mut().unwrap_region_constraints().new_region_var(universe, origin);
|
||||
self.tcx.mk_region(ty::ReVar(region_var))
|
||||
self.tcx.mk_re_var(region_var)
|
||||
}
|
||||
|
||||
/// Return the universe that the region `r` was created in. For
|
||||
|
||||
Reference in New Issue
Block a user