@@ -780,7 +780,6 @@ impl<'a> LoweringContext<'a> {
780
780
) ;
781
781
782
782
hir:: GenericParam {
783
- id : node_id,
784
783
hir_id,
785
784
name : hir_name,
786
785
attrs : hir_vec ! [ ] ,
@@ -964,7 +963,6 @@ impl<'a> LoweringContext<'a> {
964
963
let closure_hir_id = self . lower_node_id ( closure_node_id) . hir_id ;
965
964
let decl = self . lower_fn_decl ( & decl, None , /* impl trait allowed */ false , None ) ;
966
965
let generator = hir:: Expr {
967
- id : closure_node_id,
968
966
hir_id : closure_hir_id,
969
967
node : hir:: ExprKind :: Closure ( capture_clause, decl, body_id, span,
970
968
Some ( hir:: GeneratorMovability :: Static ) ) ,
@@ -1300,7 +1298,6 @@ impl<'a> LoweringContext<'a> {
1300
1298
// Set the name to `impl Bound1 + Bound2`.
1301
1299
let ident = Ident :: from_str ( & pprust:: ty_to_string ( t) ) . with_span_pos ( span) ;
1302
1300
in_band_ty_params. push ( hir:: GenericParam {
1303
- id : def_node_id,
1304
1301
hir_id,
1305
1302
name : ParamName :: Plain ( ident) ,
1306
1303
pure_wrt_drop : false ,
@@ -1350,9 +1347,8 @@ impl<'a> LoweringContext<'a> {
1350
1347
TyKind :: Mac ( _) => panic ! ( "TyMac should have been expanded by now." ) ,
1351
1348
} ;
1352
1349
1353
- let LoweredNodeId { node_id, hir_id } = self . lower_node_id ( t. id ) ;
1350
+ let LoweredNodeId { node_id : _ , hir_id } = self . lower_node_id ( t. id ) ;
1354
1351
hir:: Ty {
1355
- id : node_id,
1356
1352
node : kind,
1357
1353
span : t. span ,
1358
1354
hir_id,
@@ -1394,12 +1390,11 @@ impl<'a> LoweringContext<'a> {
1394
1390
) ;
1395
1391
1396
1392
self . with_hir_id_owner ( exist_ty_node_id, |lctx| {
1397
- let LoweredNodeId { node_id, hir_id } = lctx. next_id ( ) ;
1393
+ let LoweredNodeId { node_id : _ , hir_id } = lctx. next_id ( ) ;
1398
1394
let exist_ty_item_kind = hir:: ItemKind :: Existential ( hir:: ExistTy {
1399
1395
generics : hir:: Generics {
1400
1396
params : lifetime_defs,
1401
1397
where_clause : hir:: WhereClause {
1402
- id : node_id,
1403
1398
hir_id,
1404
1399
predicates : Vec :: new ( ) . into ( ) ,
1405
1400
} ,
@@ -1533,9 +1528,8 @@ impl<'a> LoweringContext<'a> {
1533
1528
&& !self . already_defined_lifetimes . contains ( & name) {
1534
1529
self . already_defined_lifetimes . insert ( name) ;
1535
1530
1536
- let LoweredNodeId { node_id, hir_id } = self . context . next_id ( ) ;
1531
+ let LoweredNodeId { node_id : _ , hir_id } = self . context . next_id ( ) ;
1537
1532
self . output_lifetimes . push ( hir:: GenericArg :: Lifetime ( hir:: Lifetime {
1538
- id : node_id,
1539
1533
hir_id,
1540
1534
span : lifetime. span ,
1541
1535
name,
@@ -1569,7 +1563,6 @@ impl<'a> LoweringContext<'a> {
1569
1563
} ;
1570
1564
1571
1565
self . output_lifetime_params . push ( hir:: GenericParam {
1572
- id : def_node_id,
1573
1566
hir_id,
1574
1567
name,
1575
1568
span : lifetime. span ,
@@ -1980,8 +1973,8 @@ impl<'a> LoweringContext<'a> {
1980
1973
. map ( |ty| this. lower_ty_direct ( ty, ImplTraitContext :: disallowed ( ) ) )
1981
1974
. collect ( ) ;
1982
1975
let mk_tup = |this : & mut Self , tys, span| {
1983
- let LoweredNodeId { node_id, hir_id } = this. next_id ( ) ;
1984
- hir:: Ty { node : hir:: TyKind :: Tup ( tys) , id : node_id , hir_id, span }
1976
+ let LoweredNodeId { node_id : _ , hir_id } = this. next_id ( ) ;
1977
+ hir:: Ty { node : hir:: TyKind :: Tup ( tys) , hir_id, span }
1985
1978
} ;
1986
1979
let LoweredNodeId { node_id, hir_id } = this. next_id ( ) ;
1987
1980
@@ -2318,9 +2311,8 @@ impl<'a> LoweringContext<'a> {
2318
2311
this. lower_ty ( ty, ImplTraitContext :: Existential ( Some ( fn_def_id) ) )
2319
2312
}
2320
2313
FunctionRetTy :: Default ( span) => {
2321
- let LoweredNodeId { node_id, hir_id } = this. next_id ( ) ;
2314
+ let LoweredNodeId { node_id : _ , hir_id } = this. next_id ( ) ;
2322
2315
P ( hir:: Ty {
2323
- id : node_id,
2324
2316
hir_id,
2325
2317
node : hir:: TyKind :: Tup ( hir_vec ! [ ] ) ,
2326
2318
span : * span,
@@ -2362,17 +2354,16 @@ impl<'a> LoweringContext<'a> {
2362
2354
] ;
2363
2355
2364
2356
if let Some ( ( name, span) ) = bound_lifetime {
2365
- let LoweredNodeId { node_id, hir_id } = this. next_id ( ) ;
2357
+ let LoweredNodeId { node_id : _ , hir_id } = this. next_id ( ) ;
2366
2358
bounds. push ( hir:: GenericBound :: Outlives (
2367
- hir:: Lifetime { id : node_id , hir_id, name, span } ) ) ;
2359
+ hir:: Lifetime { hir_id, name, span } ) ) ;
2368
2360
}
2369
2361
2370
2362
hir:: HirVec :: from ( bounds)
2371
2363
} ) ;
2372
2364
2373
- let LoweredNodeId { node_id, hir_id } = self . next_id ( ) ;
2365
+ let LoweredNodeId { node_id : _ , hir_id } = self . next_id ( ) ;
2374
2366
let impl_trait_ty = P ( hir:: Ty {
2375
- id : node_id,
2376
2367
node : impl_trait_ty,
2377
2368
span,
2378
2369
hir_id,
@@ -2431,10 +2422,9 @@ impl<'a> LoweringContext<'a> {
2431
2422
span : Span ,
2432
2423
name : hir:: LifetimeName ,
2433
2424
) -> hir:: Lifetime {
2434
- let LoweredNodeId { node_id, hir_id } = self . lower_node_id ( id) ;
2425
+ let LoweredNodeId { node_id : _ , hir_id } = self . lower_node_id ( id) ;
2435
2426
2436
2427
hir:: Lifetime {
2437
- id : node_id,
2438
2428
hir_id,
2439
2429
span,
2440
2430
name : name,
@@ -2524,10 +2514,9 @@ impl<'a> LoweringContext<'a> {
2524
2514
}
2525
2515
} ;
2526
2516
2527
- let LoweredNodeId { node_id, hir_id } = self . lower_node_id ( param. id ) ;
2517
+ let LoweredNodeId { node_id : _ , hir_id } = self . lower_node_id ( param. id ) ;
2528
2518
2529
2519
hir:: GenericParam {
2530
- id : node_id,
2531
2520
hir_id,
2532
2521
name,
2533
2522
span : param. ident . span ,
@@ -2608,10 +2597,9 @@ impl<'a> LoweringContext<'a> {
2608
2597
self . with_anonymous_lifetime_mode (
2609
2598
AnonymousLifetimeMode :: ReportError ,
2610
2599
|this| {
2611
- let LoweredNodeId { node_id, hir_id } = this. lower_node_id ( wc. id ) ;
2600
+ let LoweredNodeId { node_id : _ , hir_id } = this. lower_node_id ( wc. id ) ;
2612
2601
2613
2602
hir:: WhereClause {
2614
- id : node_id,
2615
2603
hir_id,
2616
2604
predicates : wc. predicates
2617
2605
. iter ( )
@@ -2672,10 +2660,9 @@ impl<'a> LoweringContext<'a> {
2672
2660
ref rhs_ty,
2673
2661
span,
2674
2662
} ) => {
2675
- let LoweredNodeId { node_id, hir_id } = self . lower_node_id ( id) ;
2663
+ let LoweredNodeId { node_id : _ , hir_id } = self . lower_node_id ( id) ;
2676
2664
2677
2665
hir:: WherePredicate :: EqPredicate ( hir:: WhereEqPredicate {
2678
- id : node_id,
2679
2666
hir_id,
2680
2667
lhs_ty : self . lower_ty ( lhs_ty, ImplTraitContext :: disallowed ( ) ) ,
2681
2668
rhs_ty : self . lower_ty ( rhs_ty, ImplTraitContext :: disallowed ( ) ) ,
@@ -2816,10 +2803,9 @@ impl<'a> LoweringContext<'a> {
2816
2803
}
2817
2804
}
2818
2805
2819
- let LoweredNodeId { node_id, hir_id } = self . lower_node_id ( b. id ) ;
2806
+ let LoweredNodeId { node_id : _ , hir_id } = self . lower_node_id ( b. id ) ;
2820
2807
2821
2808
P ( hir:: Block {
2822
- id : node_id,
2823
2809
hir_id,
2824
2810
stmts : stmts. into ( ) ,
2825
2811
expr,
@@ -3544,7 +3530,6 @@ impl<'a> LoweringContext<'a> {
3544
3530
name : ident. name ,
3545
3531
vis,
3546
3532
attrs,
3547
- id : i. id ,
3548
3533
hir_id,
3549
3534
span : i. span ,
3550
3535
body,
@@ -3900,11 +3885,10 @@ impl<'a> LoweringContext<'a> {
3900
3885
// Wrap the `if let` expr in a block.
3901
3886
let span = els. span ;
3902
3887
let els = P ( self . lower_expr ( els) ) ;
3903
- let LoweredNodeId { node_id, hir_id } = self . next_id ( ) ;
3888
+ let LoweredNodeId { node_id : _ , hir_id } = self . next_id ( ) ;
3904
3889
let blk = P ( hir:: Block {
3905
3890
stmts : hir_vec ! [ ] ,
3906
3891
expr : Some ( els) ,
3907
- id : node_id,
3908
3892
hir_id,
3909
3893
rules : hir:: DefaultBlock ,
3910
3894
span,
@@ -3947,10 +3931,9 @@ impl<'a> LoweringContext<'a> {
3947
3931
let mut block = this. lower_block ( body, true ) . into_inner ( ) ;
3948
3932
let tail = block. expr . take ( ) . map_or_else (
3949
3933
|| {
3950
- let LoweredNodeId { node_id, hir_id } = this. next_id ( ) ;
3934
+ let LoweredNodeId { node_id : _ , hir_id } = this. next_id ( ) ;
3951
3935
let span = this. sess . source_map ( ) . end_point ( unstable_span) ;
3952
3936
hir:: Expr {
3953
- id : node_id,
3954
3937
span,
3955
3938
node : hir:: ExprKind :: Tup ( hir_vec ! [ ] ) ,
3956
3939
attrs : ThinVec :: new ( ) ,
@@ -4135,10 +4118,9 @@ impl<'a> LoweringContext<'a> {
4135
4118
let struct_path = self . std_path ( e. span , & struct_path, None , is_unit) ;
4136
4119
let struct_path = hir:: QPath :: Resolved ( None , P ( struct_path) ) ;
4137
4120
4138
- let LoweredNodeId { node_id, hir_id } = self . lower_node_id ( e. id ) ;
4121
+ let LoweredNodeId { node_id : _ , hir_id } = self . lower_node_id ( e. id ) ;
4139
4122
4140
4123
return hir:: Expr {
4141
- id : node_id,
4142
4124
hir_id,
4143
4125
node : if is_unit {
4144
4126
hir:: ExprKind :: Path ( struct_path)
@@ -4488,9 +4470,8 @@ impl<'a> LoweringContext<'a> {
4488
4470
self . lower_label ( opt_label) ,
4489
4471
hir:: LoopSource :: ForLoop ,
4490
4472
) ;
4491
- let LoweredNodeId { node_id, hir_id } = self . lower_node_id ( e. id ) ;
4473
+ let LoweredNodeId { node_id : _ , hir_id } = self . lower_node_id ( e. id ) ;
4492
4474
let loop_expr = P ( hir:: Expr {
4493
- id : node_id,
4494
4475
hir_id,
4495
4476
node : loop_expr,
4496
4477
span : e. span ,
@@ -4635,10 +4616,9 @@ impl<'a> LoweringContext<'a> {
4635
4616
ExprKind :: Mac ( _) => panic ! ( "Shouldn't exist here" ) ,
4636
4617
} ;
4637
4618
4638
- let LoweredNodeId { node_id, hir_id } = self . lower_node_id ( e. id ) ;
4619
+ let LoweredNodeId { node_id : _ , hir_id } = self . lower_node_id ( e. id ) ;
4639
4620
4640
4621
hir:: Expr {
4641
- id : node_id,
4642
4622
hir_id,
4643
4623
node : kind,
4644
4624
span : e. span ,
@@ -4910,9 +4890,8 @@ impl<'a> LoweringContext<'a> {
4910
4890
}
4911
4891
4912
4892
fn expr ( & mut self , span : Span , node : hir:: ExprKind , attrs : ThinVec < Attribute > ) -> hir:: Expr {
4913
- let LoweredNodeId { node_id, hir_id } = self . next_id ( ) ;
4893
+ let LoweredNodeId { node_id : _ , hir_id } = self . next_id ( ) ;
4914
4894
hir:: Expr {
4915
- id : node_id,
4916
4895
hir_id,
4917
4896
node,
4918
4897
span,
@@ -4978,12 +4957,11 @@ impl<'a> LoweringContext<'a> {
4978
4957
stmts : hir:: HirVec < hir:: Stmt > ,
4979
4958
expr : Option < P < hir:: Expr > > ,
4980
4959
) -> hir:: Block {
4981
- let LoweredNodeId { node_id, hir_id } = self . next_id ( ) ;
4960
+ let LoweredNodeId { node_id : _ , hir_id } = self . next_id ( ) ;
4982
4961
4983
4962
hir:: Block {
4984
4963
stmts,
4985
4964
expr,
4986
- id : node_id,
4987
4965
hir_id,
4988
4966
rules : hir:: DefaultBlock ,
4989
4967
span,
@@ -5108,7 +5086,6 @@ impl<'a> LoweringContext<'a> {
5108
5086
_ => hir:: TyKind :: Path ( qpath) ,
5109
5087
} ;
5110
5088
hir:: Ty {
5111
- id : id. node_id ,
5112
5089
hir_id : id. hir_id ,
5113
5090
node,
5114
5091
span,
@@ -5124,9 +5101,8 @@ impl<'a> LoweringContext<'a> {
5124
5101
// `'f`.
5125
5102
AnonymousLifetimeMode :: CreateParameter => {
5126
5103
let fresh_name = self . collect_fresh_in_band_lifetime ( span) ;
5127
- let LoweredNodeId { node_id, hir_id } = self . next_id ( ) ;
5104
+ let LoweredNodeId { node_id : _ , hir_id } = self . next_id ( ) ;
5128
5105
hir:: Lifetime {
5129
- id : node_id,
5130
5106
hir_id,
5131
5107
span,
5132
5108
name : hir:: LifetimeName :: Param ( fresh_name) ,
@@ -5227,10 +5203,9 @@ impl<'a> LoweringContext<'a> {
5227
5203
}
5228
5204
5229
5205
fn new_implicit_lifetime ( & mut self , span : Span ) -> hir:: Lifetime {
5230
- let LoweredNodeId { node_id, hir_id } = self . next_id ( ) ;
5206
+ let LoweredNodeId { node_id : _ , hir_id } = self . next_id ( ) ;
5231
5207
5232
5208
hir:: Lifetime {
5233
- id : node_id,
5234
5209
hir_id,
5235
5210
span,
5236
5211
name : hir:: LifetimeName :: Implicit ,
0 commit comments