1
Fork 0

finish RegionKind rename

- `ReFree` -> `ReLateParam`
- `ReEarlyBound` -> `ReEarlyParam`
This commit is contained in:
lcnr 2023-11-14 13:13:27 +00:00
parent 5526682702
commit 15f21562e6
61 changed files with 300 additions and 274 deletions

View file

@ -237,7 +237,7 @@ impl<'tcx> TypeFolder<TyCtxt<'tcx>> for Canonicalizer<'_, 'tcx> {
CanonicalizeMode::Response { .. } => return r,
},
ty::ReFree(_) | ty::ReEarlyBound(_) => match self.canonicalize_mode {
ty::ReLateParam(_) | ty::ReEarlyParam(_) => match self.canonicalize_mode {
CanonicalizeMode::Input => CanonicalVarKind::Region(ty::UniverseIndex::ROOT),
CanonicalizeMode::Response { .. } => bug!("unexpected region in response: {r:?}"),
},

View file

@ -484,7 +484,7 @@ fn is_impossible_associated_item(
t.super_visit_with(self)
}
fn visit_region(&mut self, r: ty::Region<'tcx>) -> ControlFlow<Self::BreakTy> {
if let ty::ReEarlyBound(param) = r.kind()
if let ty::ReEarlyParam(param) = r.kind()
&& let param_def_id = self.generics.region_param(&param, self.tcx).def_id
&& self.tcx.parent(param_def_id) == self.trait_item_def_id
{