Skip to content

Commit f7dd438

Browse files
committed
Fix doc comments in librustc/hir/lowering.rs
1 parent 08bd4ff commit f7dd438

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

src/librustc/hir/lowering.rs

+16-16
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ const HIR_ID_COUNTER_LOCKED: u32 = 0xFFFFFFFF;
7474
pub struct LoweringContext<'a> {
7575
crate_root: Option<&'static str>,
7676

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.
7878
sess: &'a Session,
7979

8080
cstore: &'a dyn CrateStore,
@@ -107,25 +107,25 @@ pub struct LoweringContext<'a> {
107107
/// written at all (e.g., `&T` or `std::cell::Ref<T>`).
108108
anonymous_lifetime_mode: AnonymousLifetimeMode,
109109

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.
117117
lifetimes_to_define: Vec<(Span, ParamName)>,
118118

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`.
123123
is_collecting_in_band_lifetimes: bool,
124124

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.
129129
in_scope_lifetimes: Vec<Ident>,
130130

131131
current_module: NodeId,

0 commit comments

Comments
 (0)