@@ -79,7 +79,7 @@ const HIR_ID_COUNTER_LOCKED: u32 = 0xFFFFFFFF;
7979pub struct LoweringContext < ' a > {
8080 crate_root : Option < Symbol > ,
8181
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 .
8383 sess : & ' a Session ,
8484
8585 cstore : & ' a dyn CrateStore ,
@@ -126,7 +126,7 @@ pub struct LoweringContext<'a> {
126126 /// lifetime definitions in the corresponding impl or function generics.
127127 lifetimes_to_define : Vec < ( Span , ParamName ) > ,
128128
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
130130 /// indicate whether or not we're in a place where new lifetimes will result
131131 /// in in-band lifetime definitions, such a function or an impl header,
132132 /// including implicit lifetimes from `impl_header_lifetime_elision`.
@@ -154,13 +154,13 @@ pub struct LoweringContext<'a> {
154154}
155155
156156pub trait Resolver {
157- /// Obtain resolution for a `NodeId` with a single resolution.
157+ /// Obtains resolution for a `NodeId` with a single resolution.
158158 fn get_partial_res ( & mut self , id : NodeId ) -> Option < PartialRes > ;
159159
160- /// Obtain per-namespace resolutions for `use` statement with the given `NoedId `.
160+ /// Obtains per-namespace resolutions for `use` statement with the given `NodeId `.
161161 fn get_import_res ( & mut self , id : NodeId ) -> PerNS < Option < Res < NodeId > > > ;
162162
163- /// Obtain resolution for a label with the given `NodeId`.
163+ /// Obtains resolution for a label with the given `NodeId`.
164164 fn get_label_res ( & mut self , id : NodeId ) -> Option < NodeId > ;
165165
166166 /// 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> {
699699 fn lower_res ( & mut self , res : Res < NodeId > ) -> Res {
700700 res. map_id ( |id| {
701701 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) ;
703703 } )
704704 } )
705705 }
@@ -1364,7 +1364,7 @@ impl<'a> LoweringContext<'a> {
13641364 }
13651365 }
13661366 }
1367- TyKind :: Mac ( _) => bug ! ( "`TyMac` should have been expanded by now. " ) ,
1367+ TyKind :: Mac ( _) => bug ! ( "`TyMac` should have been expanded by now" ) ,
13681368 TyKind :: CVarArgs => {
13691369 // Create the implicit lifetime of the "spoofed" `VaListImpl`.
13701370 let span = self . sess . source_map ( ) . next_point ( t. span . shrink_to_lo ( ) ) ;
@@ -2999,7 +2999,7 @@ impl<'a> LoweringContext<'a> {
29992999 }
30003000 StmtKind :: Expr ( ref e) => hir:: StmtKind :: Expr ( P ( self . lower_expr ( e) ) ) ,
30013001 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" ) ,
30033003 } ;
30043004 smallvec ! [ hir:: Stmt {
30053005 hir_id: self . lower_node_id( s. id) ,
@@ -3187,7 +3187,7 @@ impl<'a> LoweringContext<'a> {
31873187
31883188 hir:: Path {
31893189 span,
3190- res : res. map_id ( |_| panic ! ( "unexpected node_id " ) ) ,
3190+ res : res. map_id ( |_| panic ! ( "unexpected `NodeId` " ) ) ,
31913191 segments : segments. into ( ) ,
31923192 }
31933193 }
0 commit comments