rename ReLateBound to ReBound
other changes: - `Region::new_late_bound` -> `Region::new_bound` - `Region::is_late_bound` -> `Region::is_bound`
This commit is contained in:
@@ -97,7 +97,7 @@ pub(in crate::solve) fn replace_erased_lifetimes_with_bound_vars<'tcx>(
|
||||
ty::ReErased => {
|
||||
let br = ty::BoundRegion { var: ty::BoundVar::from_u32(counter), kind: ty::BrAnon };
|
||||
counter += 1;
|
||||
ty::Region::new_late_bound(tcx, current_depth, br)
|
||||
ty::Region::new_bound(tcx, current_depth, br)
|
||||
}
|
||||
// All free regions should be erased here.
|
||||
r => bug!("unexpected region: {r:?}"),
|
||||
|
||||
@@ -222,7 +222,7 @@ impl<'tcx> TypeFolder<TyCtxt<'tcx>> for Canonicalizer<'_, 'tcx> {
|
||||
}
|
||||
|
||||
let kind = match *r {
|
||||
ty::ReLateBound(..) => return r,
|
||||
ty::ReBound(..) => return r,
|
||||
|
||||
// We may encounter `ReStatic` in item signatures or the hidden type
|
||||
// of an opaque. `ReErased` should only be encountered in the hidden
|
||||
@@ -278,7 +278,7 @@ impl<'tcx> TypeFolder<TyCtxt<'tcx>> for Canonicalizer<'_, 'tcx> {
|
||||
var
|
||||
});
|
||||
let br = ty::BoundRegion { var, kind: BrAnon };
|
||||
ty::Region::new_late_bound(self.interner(), self.binder_index, br)
|
||||
ty::Region::new_bound(self.interner(), self.binder_index, br)
|
||||
}
|
||||
|
||||
fn fold_ty(&mut self, t: Ty<'tcx>) -> Ty<'tcx> {
|
||||
|
||||
@@ -262,7 +262,7 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
|
||||
}
|
||||
}
|
||||
GenericArgKind::Lifetime(r) => {
|
||||
if let ty::ReLateBound(debruijn, br) = *r {
|
||||
if let ty::ReBound(debruijn, br) = *r {
|
||||
assert_eq!(debruijn, ty::INNERMOST);
|
||||
opt_values[br.var] = Some(*original_value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user