about summary refs log tree commit diff
path: root/compiler/rustc_ty_utils/src/implied_bounds.rs
diff options
context:
space:
mode:
authorlcnr <rust@lcnr.de>2023-11-14 13:13:27 +0000
committerlcnr <rust@lcnr.de>2023-11-14 13:13:27 +0000
commit15f21562e627cb37e74d5e27f22eafc76cf4ec01 (patch)
tree67136a951b052553165db07c40f06bd9c9c813f3 /compiler/rustc_ty_utils/src/implied_bounds.rs
parent5526682702c502626f5dc31f80d07f2b7339c81a (diff)
downloadrust-15f21562e627cb37e74d5e27f22eafc76cf4ec01.tar.gz
rust-15f21562e627cb37e74d5e27f22eafc76cf4ec01.zip
finish `RegionKind` rename
- `ReFree` -> `ReLateParam`
- `ReEarlyBound` -> `ReEarlyParam`
Diffstat (limited to 'compiler/rustc_ty_utils/src/implied_bounds.rs')
-rw-r--r--compiler/rustc_ty_utils/src/implied_bounds.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/compiler/rustc_ty_utils/src/implied_bounds.rs b/compiler/rustc_ty_utils/src/implied_bounds.rs
index 5c34df1ed50..24afd7dc357 100644
--- a/compiler/rustc_ty_utils/src/implied_bounds.rs
+++ b/compiler/rustc_ty_utils/src/implied_bounds.rs
@@ -53,9 +53,9 @@ fn assumed_wf_types<'tcx>(tcx: TyCtxt<'tcx>, def_id: LocalDefId) -> &'tcx [(Ty<'
         DefKind::AssocTy if let Some(data) = tcx.opt_rpitit_info(def_id.to_def_id()) => {
             match data {
                 ty::ImplTraitInTraitData::Trait { fn_def_id, .. } => {
-                    // We need to remap all of the late-bound lifetimes in theassumed wf types
-                    // of the fn (which are represented as ReFree) to the early-bound lifetimes
-                    // of the RPITIT (which are represented by ReEarlyBound owned by the opaque).
+                    // We need to remap all of the late-bound lifetimes in the assumed wf types
+                    // of the fn (which are represented as ReLateParam) to the early-bound lifetimes
+                    // of the RPITIT (which are represented by ReEarlyParam owned by the opaque).
                     // Luckily, this is very easy to do because we already have that mapping
                     // stored in the HIR of this RPITIT.
                     //
@@ -65,19 +65,19 @@ fn assumed_wf_types<'tcx>(tcx: TyCtxt<'tcx>, def_id: LocalDefId) -> &'tcx [(Ty<'
                     let mut mapping = FxHashMap::default();
                     let generics = tcx.generics_of(def_id);
 
-                    // For each captured opaque lifetime, if it's late-bound (`ReFree` in this case,
-                    // since it has been liberated), map it back to the early-bound lifetime of
+                    // For each captured opaque lifetime, if it's late-bound (`ReLateParam` in this
+                    // case, since it has been liberated), map it back to the early-bound lifetime of
                     // the GAT. Since RPITITs also have all of the fn's generics, we slice only
                     // the end of the list corresponding to the opaque's generics.
                     for param in &generics.params[tcx.generics_of(fn_def_id).params.len()..] {
                         let orig_lt =
                             tcx.map_rpit_lifetime_to_fn_lifetime(param.def_id.expect_local());
-                        if matches!(*orig_lt, ty::ReFree(..)) {
+                        if matches!(*orig_lt, ty::ReLateParam(..)) {
                             mapping.insert(
                                 orig_lt,
-                                ty::Region::new_early_bound(
+                                ty::Region::new_early_param(
                                     tcx,
-                                    ty::EarlyBoundRegion {
+                                    ty::EarlyParamRegion {
                                         def_id: param.def_id,
                                         index: param.index,
                                         name: param.name,
@@ -90,7 +90,7 @@ fn assumed_wf_types<'tcx>(tcx: TyCtxt<'tcx>, def_id: LocalDefId) -> &'tcx [(Ty<'
                     let remapped_wf_tys = tcx.fold_regions(
                         tcx.assumed_wf_types(fn_def_id.expect_local()).to_vec(),
                         |region, _| {
-                            // If `region` is a `ReFree` that is captured by the
+                            // If `region` is a `ReLateParam` that is captured by the
                             // opaque, remap it to its corresponding the early-
                             // bound region.
                             if let Some(remapped_region) = mapping.get(&region) {