@@ -17,7 +17,7 @@ impl LoweringContext<'_> {
17
17
}
18
18
19
19
pub ( super ) fn lower_expr ( & mut self , e : & Expr ) -> hir:: Expr {
20
- let kind = match e. node {
20
+ let kind = match e. kind {
21
21
ExprKind :: Box ( ref inner) => hir:: ExprKind :: Box ( P ( self . lower_expr ( inner) ) ) ,
22
22
ExprKind :: Array ( ref exprs) => hir:: ExprKind :: Array ( self . lower_exprs ( exprs) ) ,
23
23
ExprKind :: Repeat ( ref expr, ref count) => {
@@ -184,7 +184,7 @@ impl LoweringContext<'_> {
184
184
185
185
hir:: Expr {
186
186
hir_id : self . lower_node_id ( e. id ) ,
187
- node : kind,
187
+ kind,
188
188
span : e. span ,
189
189
attrs : e. attrs . clone ( ) ,
190
190
}
@@ -282,7 +282,7 @@ impl LoweringContext<'_> {
282
282
283
283
// Handle then + scrutinee:
284
284
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 {
286
286
// `<pat> => <then>`:
287
287
ExprKind :: Let ( ref pat, ref scrutinee) => {
288
288
let scrutinee = self . lower_expr ( scrutinee) ;
@@ -332,7 +332,7 @@ impl LoweringContext<'_> {
332
332
333
333
// Handle then + scrutinee:
334
334
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 {
336
336
ExprKind :: Let ( ref pat, ref scrutinee) => {
337
337
// to:
338
338
//
@@ -459,7 +459,7 @@ impl LoweringContext<'_> {
459
459
} ) ;
460
460
461
461
// `static || -> <ret_ty> { body }`:
462
- let generator_node = hir:: ExprKind :: Closure (
462
+ let generator_kind = hir:: ExprKind :: Closure (
463
463
capture_clause,
464
464
decl,
465
465
body_id,
@@ -468,7 +468,7 @@ impl LoweringContext<'_> {
468
468
) ;
469
469
let generator = hir:: Expr {
470
470
hir_id : self . lower_node_id ( closure_node_id) ,
471
- node : generator_node ,
471
+ kind : generator_kind ,
472
472
span,
473
473
attrs : ThinVec :: new ( ) ,
474
474
} ;
@@ -625,7 +625,7 @@ impl LoweringContext<'_> {
625
625
// loop { .. }
626
626
let loop_expr = P ( hir:: Expr {
627
627
hir_id : loop_hir_id,
628
- node : hir:: ExprKind :: Loop (
628
+ kind : hir:: ExprKind :: Loop (
629
629
loop_block,
630
630
None ,
631
631
hir:: LoopSource :: Loop ,
@@ -1135,14 +1135,14 @@ impl LoweringContext<'_> {
1135
1135
) ) ;
1136
1136
1137
1137
// `[opt_ident]: loop { ... }`
1138
- let loop_expr = hir:: ExprKind :: Loop (
1138
+ let kind = hir:: ExprKind :: Loop (
1139
1139
loop_block,
1140
1140
self . lower_label ( opt_label) ,
1141
1141
hir:: LoopSource :: ForLoop ,
1142
1142
) ;
1143
1143
let loop_expr = P ( hir:: Expr {
1144
1144
hir_id : self . lower_node_id ( e. id ) ,
1145
- node : loop_expr ,
1145
+ kind ,
1146
1146
span : e. span ,
1147
1147
attrs : ThinVec :: new ( ) ,
1148
1148
} ) ;
@@ -1443,15 +1443,10 @@ impl LoweringContext<'_> {
1443
1443
pub ( super ) fn expr (
1444
1444
& mut self ,
1445
1445
span : Span ,
1446
- node : hir:: ExprKind ,
1446
+ kind : hir:: ExprKind ,
1447
1447
attrs : ThinVec < Attribute >
1448
1448
) -> 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 }
1455
1450
}
1456
1451
1457
1452
fn field ( & mut self , ident : Ident , expr : P < hir:: Expr > , span : Span ) -> hir:: Field {
0 commit comments