Skip to content

Commit c8c691f

Browse files
committed
Update comments.
1 parent d3b7ea6 commit c8c691f

File tree

1 file changed

+5
-9
lines changed
  • compiler/rustc_ast_lowering/src

1 file changed

+5
-9
lines changed

Diff for: compiler/rustc_ast_lowering/src/lib.rs

+5-9
Original file line numberDiff line numberDiff line change
@@ -129,19 +129,15 @@ struct LoweringContext<'a, 'hir: 'a> {
129129
/// written at all (e.g., `&T` or `std::cell::Ref<T>`).
130130
anonymous_lifetime_mode: AnonymousLifetimeMode,
131131

132-
/// Used to create lifetime definitions from in-band lifetime usages.
133-
/// e.g., `fn foo(x: &'x u8) -> &'x u8` to `fn foo<'x>(x: &'x u8) -> &'x u8`
134-
/// When a named lifetime is encountered in a function or impl header and
135-
/// has not been defined
136-
/// (i.e., it doesn't appear in the in_scope_lifetimes list), it is added
132+
/// Used to create lifetime definitions for anonymous lifetimes.
133+
/// When an anonymous lifetime is encountered in a function or impl header and
134+
/// requires to create a fresh lifetime parameter, it is added
137135
/// to this list. The results of this list are then added to the list of
138136
/// lifetime definitions in the corresponding impl or function generics.
139137
lifetimes_to_define: Vec<(Span, NodeId)>,
140138

141-
/// `true` if in-band lifetimes are being collected. This is used to
142-
/// indicate whether or not we're in a place where new lifetimes will result
143-
/// in in-band lifetime definitions, such a function or an impl header,
144-
/// including implicit lifetimes from `impl_header_lifetime_elision`.
139+
/// If anonymous lifetimes are being collected, this field holds the parent
140+
/// `LocalDefId` to create the fresh lifetime parameters' `LocalDefId`.
145141
is_collecting_anonymous_lifetimes: Option<LocalDefId>,
146142

147143
/// Currently in-scope lifetimes defined in impl headers, fn headers, or HRTB.

0 commit comments

Comments
 (0)