@@ -79,7 +79,7 @@ const HIR_ID_COUNTER_LOCKED: u32 = 0xFFFFFFFF;
79
79
pub struct LoweringContext < ' a > {
80
80
crate_root : Option < Symbol > ,
81
81
82
- /// Used to assign ids to HIR nodes that do not directly correspond to an AST node .
82
+ /// Used to assign IDs to HIR nodes that do not directly correspond to AST nodes .
83
83
sess : & ' a Session ,
84
84
85
85
cstore : & ' a dyn CrateStore ,
@@ -126,7 +126,7 @@ pub struct LoweringContext<'a> {
126
126
/// lifetime definitions in the corresponding impl or function generics.
127
127
lifetimes_to_define : Vec < ( Span , ParamName ) > ,
128
128
129
- /// Whether or not in-band lifetimes are being collected. This is used to
129
+ /// `true` ifs in-band lifetimes are being collected. This is used to
130
130
/// indicate whether or not we're in a place where new lifetimes will result
131
131
/// in in-band lifetime definitions, such a function or an impl header,
132
132
/// including implicit lifetimes from `impl_header_lifetime_elision`.
@@ -154,13 +154,13 @@ pub struct LoweringContext<'a> {
154
154
}
155
155
156
156
pub trait Resolver {
157
- /// Obtain resolution for a `NodeId` with a single resolution.
157
+ /// Obtains resolution for a `NodeId` with a single resolution.
158
158
fn get_partial_res ( & mut self , id : NodeId ) -> Option < PartialRes > ;
159
159
160
- /// Obtain per-namespace resolutions for `use` statement with the given `NoedId `.
160
+ /// Obtains per-namespace resolutions for `use` statement with the given `NodeId `.
161
161
fn get_import_res ( & mut self , id : NodeId ) -> PerNS < Option < Res < NodeId > > > ;
162
162
163
- /// Obtain resolution for a label with the given `NodeId`.
163
+ /// Obtains resolution for a label with the given `NodeId`.
164
164
fn get_label_res ( & mut self , id : NodeId ) -> Option < NodeId > ;
165
165
166
166
/// We must keep the set of definitions up to date as we add nodes that weren't in the AST.
@@ -699,7 +699,7 @@ impl<'a> LoweringContext<'a> {
699
699
fn lower_res ( & mut self , res : Res < NodeId > ) -> Res {
700
700
res. map_id ( |id| {
701
701
self . lower_node_id_generic ( id, |_| {
702
- panic ! ( "expected node_id to be lowered already for res {:#?}" , res)
702
+ panic ! ( "expected `NodeId` to be lowered already for res {:#?}" , res) ;
703
703
} )
704
704
} )
705
705
}
@@ -1364,7 +1364,7 @@ impl<'a> LoweringContext<'a> {
1364
1364
}
1365
1365
}
1366
1366
}
1367
- TyKind :: Mac ( _) => bug ! ( "`TyMac` should have been expanded by now. " ) ,
1367
+ TyKind :: Mac ( _) => bug ! ( "`TyMac` should have been expanded by now" ) ,
1368
1368
TyKind :: CVarArgs => {
1369
1369
// Create the implicit lifetime of the "spoofed" `VaListImpl`.
1370
1370
let span = self . sess . source_map ( ) . next_point ( t. span . shrink_to_lo ( ) ) ;
@@ -2999,7 +2999,7 @@ impl<'a> LoweringContext<'a> {
2999
2999
}
3000
3000
StmtKind :: Expr ( ref e) => hir:: StmtKind :: Expr ( P ( self . lower_expr ( e) ) ) ,
3001
3001
StmtKind :: Semi ( ref e) => hir:: StmtKind :: Semi ( P ( self . lower_expr ( e) ) ) ,
3002
- StmtKind :: Mac ( ..) => panic ! ( "Shouldn 't exist here" ) ,
3002
+ StmtKind :: Mac ( ..) => panic ! ( "shouldn 't exist here" ) ,
3003
3003
} ;
3004
3004
smallvec ! [ hir:: Stmt {
3005
3005
hir_id: self . lower_node_id( s. id) ,
@@ -3187,7 +3187,7 @@ impl<'a> LoweringContext<'a> {
3187
3187
3188
3188
hir:: Path {
3189
3189
span,
3190
- res : res. map_id ( |_| panic ! ( "unexpected node_id " ) ) ,
3190
+ res : res. map_id ( |_| panic ! ( "unexpected `NodeId` " ) ) ,
3191
3191
segments : segments. into ( ) ,
3192
3192
}
3193
3193
}
0 commit comments