Skip to content

Commit 87c841e

Browse files
committed
Remove the region terminology.
1 parent bf38ba2 commit 87c841e

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

compiler/rustc_resolve/src/late.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ enum LifetimeRibKind {
238238
/// `body_id` is an anonymous constant and `lifetime_ref` is non-static.
239239
AnonConst,
240240

241-
/// Create a new anonymous region parameter and reference it.
241+
/// Create a new anonymous lifetime parameter and reference it.
242242
///
243243
/// If `report_in_path`, report an error when encountering lifetime elision in a path:
244244
/// ```ignore
@@ -1279,13 +1279,13 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
12791279
for i in &mut indices {
12801280
let rib = &self.lifetime_ribs[i];
12811281
let normalized_ident = ident.normalize_to_macros_2_0();
1282-
if let Some(&(_, region)) = rib.bindings.get(&normalized_ident) {
1283-
self.record_lifetime_res(lifetime.id, region);
1282+
if let Some(&(_, res)) = rib.bindings.get(&normalized_ident) {
1283+
self.record_lifetime_res(lifetime.id, res);
12841284

1285-
if let LifetimeRes::Param { param, .. } = region {
1285+
if let LifetimeRes::Param { param, .. } = res {
12861286
match self.lifetime_uses.entry(param) {
12871287
Entry::Vacant(v) => {
1288-
debug!("First use of {:?} at {:?}", region, ident.span);
1288+
debug!("First use of {:?} at {:?}", res, ident.span);
12891289
let use_set = self
12901290
.lifetime_ribs
12911291
.iter()
@@ -1310,7 +1310,7 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
13101310
v.insert(use_set);
13111311
}
13121312
Entry::Occupied(mut o) => {
1313-
debug!("Many uses of {:?} at {:?}", region, ident.span);
1313+
debug!("Many uses of {:?} at {:?}", res, ident.span);
13141314
*o.get_mut() = LifetimeUseSet::Many;
13151315
}
13161316
}
@@ -1433,13 +1433,13 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
14331433
);
14341434
debug!(?def_id);
14351435

1436-
let region = LifetimeRes::Fresh { param: def_id, binder: item_node_id };
1436+
let res = LifetimeRes::Fresh { param: def_id, binder: item_node_id };
14371437
self.r.extra_lifetime_params_map.entry(item_node_id).or_insert_with(Vec::new).push((
14381438
ident,
14391439
def_node_id,
1440-
region,
1440+
res,
14411441
));
1442-
region
1442+
res
14431443
}
14441444

14451445
#[tracing::instrument(level = "debug", skip(self))]

0 commit comments

Comments
 (0)