Update comments.
This commit is contained in:
parent
d3b7ea6c9e
commit
c8c691ff88
@ -129,19 +129,15 @@ struct LoweringContext<'a, 'hir: 'a> {
|
|||||||
/// written at all (e.g., `&T` or `std::cell::Ref<T>`).
|
/// written at all (e.g., `&T` or `std::cell::Ref<T>`).
|
||||||
anonymous_lifetime_mode: AnonymousLifetimeMode,
|
anonymous_lifetime_mode: AnonymousLifetimeMode,
|
||||||
|
|
||||||
/// Used to create lifetime definitions from in-band lifetime usages.
|
/// Used to create lifetime definitions for anonymous lifetimes.
|
||||||
/// e.g., `fn foo(x: &'x u8) -> &'x u8` to `fn foo<'x>(x: &'x u8) -> &'x u8`
|
/// When an anonymous lifetime is encountered in a function or impl header and
|
||||||
/// When a named lifetime is encountered in a function or impl header and
|
/// requires to create a fresh lifetime parameter, it is added
|
||||||
/// has not been defined
|
|
||||||
/// (i.e., it doesn't appear in the in_scope_lifetimes list), it is added
|
|
||||||
/// to this list. The results of this list are then added to the list of
|
/// to this list. The results of this list are then added to the list of
|
||||||
/// lifetime definitions in the corresponding impl or function generics.
|
/// lifetime definitions in the corresponding impl or function generics.
|
||||||
lifetimes_to_define: Vec<(Span, NodeId)>,
|
lifetimes_to_define: Vec<(Span, NodeId)>,
|
||||||
|
|
||||||
/// `true` if in-band lifetimes are being collected. This is used to
|
/// If anonymous lifetimes are being collected, this field holds the parent
|
||||||
/// indicate whether or not we're in a place where new lifetimes will result
|
/// `LocalDefId` to create the fresh lifetime parameters' `LocalDefId`.
|
||||||
/// in in-band lifetime definitions, such a function or an impl header,
|
|
||||||
/// including implicit lifetimes from `impl_header_lifetime_elision`.
|
|
||||||
is_collecting_anonymous_lifetimes: Option<LocalDefId>,
|
is_collecting_anonymous_lifetimes: Option<LocalDefId>,
|
||||||
|
|
||||||
/// Currently in-scope lifetimes defined in impl headers, fn headers, or HRTB.
|
/// Currently in-scope lifetimes defined in impl headers, fn headers, or HRTB.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user