diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2022-06-05 21:43:02 +0200 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2022-06-19 22:28:53 +0200 |
| commit | 87c841e19096f065d0e8a320c2c529b9d293da5d (patch) | |
| tree | 4cf12a49013759e7c605970c6e103cdbce65f6fd /compiler | |
| parent | bf38ba260d43171051249b08cfd9466a518804d6 (diff) | |
| download | rust-87c841e19096f065d0e8a320c2c529b9d293da5d.tar.gz rust-87c841e19096f065d0e8a320c2c529b9d293da5d.zip | |
Remove the `region` terminology.
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_resolve/src/late.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/compiler/rustc_resolve/src/late.rs b/compiler/rustc_resolve/src/late.rs index 74999067cd4..f260713a18f 100644 --- a/compiler/rustc_resolve/src/late.rs +++ b/compiler/rustc_resolve/src/late.rs @@ -238,7 +238,7 @@ enum LifetimeRibKind { /// `body_id` is an anonymous constant and `lifetime_ref` is non-static. AnonConst, - /// Create a new anonymous region parameter and reference it. + /// Create a new anonymous lifetime parameter and reference it. /// /// If `report_in_path`, report an error when encountering lifetime elision in a path: /// ```ignore @@ -1279,13 +1279,13 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> { for i in &mut indices { let rib = &self.lifetime_ribs[i]; let normalized_ident = ident.normalize_to_macros_2_0(); - if let Some(&(_, region)) = rib.bindings.get(&normalized_ident) { - self.record_lifetime_res(lifetime.id, region); + if let Some(&(_, res)) = rib.bindings.get(&normalized_ident) { + self.record_lifetime_res(lifetime.id, res); - if let LifetimeRes::Param { param, .. } = region { + if let LifetimeRes::Param { param, .. } = res { match self.lifetime_uses.entry(param) { Entry::Vacant(v) => { - debug!("First use of {:?} at {:?}", region, ident.span); + debug!("First use of {:?} at {:?}", res, ident.span); let use_set = self .lifetime_ribs .iter() @@ -1310,7 +1310,7 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> { v.insert(use_set); } Entry::Occupied(mut o) => { - debug!("Many uses of {:?} at {:?}", region, ident.span); + debug!("Many uses of {:?} at {:?}", res, ident.span); *o.get_mut() = LifetimeUseSet::Many; } } @@ -1433,13 +1433,13 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> { ); debug!(?def_id); - let region = LifetimeRes::Fresh { param: def_id, binder: item_node_id }; + let res = LifetimeRes::Fresh { param: def_id, binder: item_node_id }; self.r.extra_lifetime_params_map.entry(item_node_id).or_insert_with(Vec::new).push(( ident, def_node_id, - region, + res, )); - region + res } #[tracing::instrument(level = "debug", skip(self))] |
