Add specialized variants of mk_region
.
Much like there are specialized variants of `mk_ty`. This will enable some optimization in the next commit. Also rename the existing `re_error*` functions as `mk_re_error*`, for consistency.
This commit is contained in:
parent
7439028374
commit
cef9004f5a
39 changed files with 196 additions and 173 deletions
|
@ -1103,7 +1103,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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue