@@ -17,7 +17,7 @@ impl LoweringContext<'_> {
1717 }
1818
1919 pub ( super ) fn lower_expr ( & mut self , e : & Expr ) -> hir:: Expr {
20- let kind = match e. node {
20+ let kind = match e. kind {
2121 ExprKind :: Box ( ref inner) => hir:: ExprKind :: Box ( P ( self . lower_expr ( inner) ) ) ,
2222 ExprKind :: Array ( ref exprs) => hir:: ExprKind :: Array ( self . lower_exprs ( exprs) ) ,
2323 ExprKind :: Repeat ( ref expr, ref count) => {
@@ -184,7 +184,7 @@ impl LoweringContext<'_> {
184184
185185 hir:: Expr {
186186 hir_id : self . lower_node_id ( e. id ) ,
187- node : kind,
187+ kind,
188188 span : e. span ,
189189 attrs : e. attrs . clone ( ) ,
190190 }
@@ -282,7 +282,7 @@ impl LoweringContext<'_> {
282282
283283 // Handle then + scrutinee:
284284 let then_expr = self . lower_block_expr ( then) ;
285- let ( then_pat, scrutinee, desugar) = match cond. node {
285+ let ( then_pat, scrutinee, desugar) = match cond. kind {
286286 // `<pat> => <then>`:
287287 ExprKind :: Let ( ref pat, ref scrutinee) => {
288288 let scrutinee = self . lower_expr ( scrutinee) ;
@@ -332,7 +332,7 @@ impl LoweringContext<'_> {
332332
333333 // Handle then + scrutinee:
334334 let then_expr = self . lower_block_expr ( body) ;
335- let ( then_pat, scrutinee, desugar, source) = match cond. node {
335+ let ( then_pat, scrutinee, desugar, source) = match cond. kind {
336336 ExprKind :: Let ( ref pat, ref scrutinee) => {
337337 // to:
338338 //
@@ -459,7 +459,7 @@ impl LoweringContext<'_> {
459459 } ) ;
460460
461461 // `static || -> <ret_ty> { body }`:
462- let generator_node = hir:: ExprKind :: Closure (
462+ let generator_kind = hir:: ExprKind :: Closure (
463463 capture_clause,
464464 decl,
465465 body_id,
@@ -468,7 +468,7 @@ impl LoweringContext<'_> {
468468 ) ;
469469 let generator = hir:: Expr {
470470 hir_id : self . lower_node_id ( closure_node_id) ,
471- node : generator_node ,
471+ kind : generator_kind ,
472472 span,
473473 attrs : ThinVec :: new ( ) ,
474474 } ;
@@ -625,7 +625,7 @@ impl LoweringContext<'_> {
625625 // loop { .. }
626626 let loop_expr = P ( hir:: Expr {
627627 hir_id : loop_hir_id,
628- node : hir:: ExprKind :: Loop (
628+ kind : hir:: ExprKind :: Loop (
629629 loop_block,
630630 None ,
631631 hir:: LoopSource :: Loop ,
@@ -1135,14 +1135,14 @@ impl LoweringContext<'_> {
11351135 ) ) ;
11361136
11371137 // `[opt_ident]: loop { ... }`
1138- let loop_expr = hir:: ExprKind :: Loop (
1138+ let kind = hir:: ExprKind :: Loop (
11391139 loop_block,
11401140 self . lower_label ( opt_label) ,
11411141 hir:: LoopSource :: ForLoop ,
11421142 ) ;
11431143 let loop_expr = P ( hir:: Expr {
11441144 hir_id : self . lower_node_id ( e. id ) ,
1145- node : loop_expr ,
1145+ kind ,
11461146 span : e. span ,
11471147 attrs : ThinVec :: new ( ) ,
11481148 } ) ;
@@ -1443,15 +1443,10 @@ impl LoweringContext<'_> {
14431443 pub ( super ) fn expr (
14441444 & mut self ,
14451445 span : Span ,
1446- node : hir:: ExprKind ,
1446+ kind : hir:: ExprKind ,
14471447 attrs : ThinVec < Attribute >
14481448 ) -> hir:: Expr {
1449- hir:: Expr {
1450- hir_id : self . next_id ( ) ,
1451- node,
1452- span,
1453- attrs,
1454- }
1449+ hir:: Expr { hir_id : self . next_id ( ) , kind, span, attrs }
14551450 }
14561451
14571452 fn field ( & mut self , ident : Ident , expr : P < hir:: Expr > , span : Span ) -> hir:: Field {
0 commit comments