@@ -74,7 +74,7 @@ const HIR_ID_COUNTER_LOCKED: u32 = 0xFFFFFFFF;
74
74
pub struct LoweringContext < ' a > {
75
75
crate_root : Option < & ' static str > ,
76
76
77
- // Used to assign ids to HIR nodes that do not directly correspond to an AST node.
77
+ /// Used to assign ids to HIR nodes that do not directly correspond to an AST node.
78
78
sess : & ' a Session ,
79
79
80
80
cstore : & ' a dyn CrateStore ,
@@ -107,25 +107,25 @@ pub struct LoweringContext<'a> {
107
107
/// written at all (e.g., `&T` or `std::cell::Ref<T>`).
108
108
anonymous_lifetime_mode : AnonymousLifetimeMode ,
109
109
110
- // Used to create lifetime definitions from in-band lifetime usages.
111
- // e.g., `fn foo(x: &'x u8) -> &'x u8` to `fn foo<'x>(x: &'x u8) -> &'x u8`
112
- // When a named lifetime is encountered in a function or impl header and
113
- // has not been defined
114
- // (i.e., it doesn't appear in the in_scope_lifetimes list), it is added
115
- // to this list. The results of this list are then added to the list of
116
- // lifetime definitions in the corresponding impl or function generics.
110
+ /// Used to create lifetime definitions from in-band lifetime usages.
111
+ /// e.g., `fn foo(x: &'x u8) -> &'x u8` to `fn foo<'x>(x: &'x u8) -> &'x u8`
112
+ /// When a named lifetime is encountered in a function or impl header and
113
+ /// has not been defined
114
+ /// (i.e., it doesn't appear in the in_scope_lifetimes list), it is added
115
+ /// to this list. The results of this list are then added to the list of
116
+ /// lifetime definitions in the corresponding impl or function generics.
117
117
lifetimes_to_define : Vec < ( Span , ParamName ) > ,
118
118
119
- // Whether or not in-band lifetimes are being collected. This is used to
120
- // indicate whether or not we're in a place where new lifetimes will result
121
- // in in-band lifetime definitions, such a function or an impl header,
122
- // including implicit lifetimes from `impl_header_lifetime_elision`.
119
+ /// Whether or not in-band lifetimes are being collected. This is used to
120
+ /// indicate whether or not we're in a place where new lifetimes will result
121
+ /// in in-band lifetime definitions, such a function or an impl header,
122
+ /// including implicit lifetimes from `impl_header_lifetime_elision`.
123
123
is_collecting_in_band_lifetimes : bool ,
124
124
125
- // Currently in-scope lifetimes defined in impl headers, fn headers, or HRTB.
126
- // When `is_collectin_in_band_lifetimes` is true, each lifetime is checked
127
- // against this list to see if it is already in-scope, or if a definition
128
- // needs to be created for it.
125
+ /// Currently in-scope lifetimes defined in impl headers, fn headers, or HRTB.
126
+ /// When `is_collectin_in_band_lifetimes` is true, each lifetime is checked
127
+ /// against this list to see if it is already in-scope, or if a definition
128
+ /// needs to be created for it.
129
129
in_scope_lifetimes : Vec < Ident > ,
130
130
131
131
current_module : NodeId ,
0 commit comments