Rename tcx.mk_re_*
=> Region::new_*
This commit is contained in:
parent
498553fc04
commit
e33e20824f
42 changed files with 291 additions and 233 deletions
|
@ -96,7 +96,7 @@ pub(in crate::solve) fn replace_erased_lifetimes_with_bound_vars<'tcx>(
|
|||
let br =
|
||||
ty::BoundRegion { var: ty::BoundVar::from_u32(counter), kind: ty::BrAnon(None) };
|
||||
counter += 1;
|
||||
tcx.mk_re_late_bound(current_depth, br)
|
||||
ty::Region::new_late_bound(tcx, current_depth, br)
|
||||
}
|
||||
// All free regions should be erased here.
|
||||
r => bug!("unexpected region: {r:?}"),
|
||||
|
|
|
@ -255,7 +255,7 @@ impl<'tcx> TypeFolder<TyCtxt<'tcx>> for Canonicalizer<'_, 'tcx> {
|
|||
}),
|
||||
);
|
||||
let br = ty::BoundRegion { var, kind: BrAnon(None) };
|
||||
self.interner().mk_re_late_bound(self.binder_index, br)
|
||||
ty::Region::new_late_bound(self.interner(), self.binder_index, br)
|
||||
}
|
||||
|
||||
fn fold_ty(&mut self, mut t: Ty<'tcx>) -> Ty<'tcx> {
|
||||
|
|
|
@ -824,7 +824,7 @@ impl<'tcx> TypeFolder<TyCtxt<'tcx>> for BoundVarReplacer<'_, 'tcx> {
|
|||
let universe = self.universe_for(debruijn);
|
||||
let p = ty::PlaceholderRegion { universe, bound: br };
|
||||
self.mapped_regions.insert(p, br);
|
||||
self.infcx.tcx.mk_re_placeholder(p)
|
||||
ty::Region::new_placeholder(self.infcx.tcx, p)
|
||||
}
|
||||
_ => r,
|
||||
}
|
||||
|
@ -945,7 +945,7 @@ impl<'tcx> TypeFolder<TyCtxt<'tcx>> for PlaceholderReplacer<'_, 'tcx> {
|
|||
let db = ty::DebruijnIndex::from_usize(
|
||||
self.universe_indices.len() - index + self.current_index.as_usize() - 1,
|
||||
);
|
||||
self.interner().mk_re_late_bound(db, *replace_var)
|
||||
ty::Region::new_late_bound(self.interner(), db, *replace_var)
|
||||
}
|
||||
None => r1,
|
||||
}
|
||||
|
|
|
@ -550,7 +550,8 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
|||
let kind = ty::BoundRegionKind::BrNamed(param.def_id, param.name);
|
||||
let bound_var = ty::BoundVariableKind::Region(kind);
|
||||
bound_vars.push(bound_var);
|
||||
tcx.mk_re_late_bound(
|
||||
ty::Region::new_late_bound(
|
||||
tcx,
|
||||
ty::INNERMOST,
|
||||
ty::BoundRegion {
|
||||
var: ty::BoundVar::from_usize(bound_vars.len() - 1),
|
||||
|
|
|
@ -3027,7 +3027,7 @@ fn bind_generator_hidden_types_above<'tcx>(
|
|||
kind: ty::BrAnon(None),
|
||||
};
|
||||
counter += 1;
|
||||
tcx.mk_re_late_bound(current_depth, br)
|
||||
ty::Region::new_late_bound(tcx, current_depth, br)
|
||||
}
|
||||
r => bug!("unexpected region: {r:?}"),
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue