@@ -265,7 +265,7 @@ impl InferArg {
265
265
#[ derive( Debug , HashStable_Generic ) ]
266
266
pub enum GenericArg < ' hir > {
267
267
Lifetime ( Lifetime ) ,
268
- Type ( Ty < ' hir > ) ,
268
+ Type ( & ' hir Ty < ' hir > ) ,
269
269
Const ( ConstArg ) ,
270
270
Infer ( InferArg ) ,
271
271
}
@@ -280,7 +280,7 @@ impl GenericArg<'_> {
280
280
}
281
281
}
282
282
283
- pub fn id ( & self ) -> HirId {
283
+ pub fn hir_id ( & self ) -> HirId {
284
284
match self {
285
285
GenericArg :: Lifetime ( l) => l. hir_id ,
286
286
GenericArg :: Type ( t) => t. hir_id ,
@@ -1321,7 +1321,7 @@ pub enum StmtKind<'hir> {
1321
1321
Semi ( & ' hir Expr < ' hir > ) ,
1322
1322
}
1323
1323
1324
- /// Represents a `let` statement (i.e., `let <pat>:<ty> = <expr >;`).
1324
+ /// Represents a `let` statement (i.e., `let <pat>:<ty> = <init >;`).
1325
1325
#[ derive( Debug , HashStable_Generic ) ]
1326
1326
pub struct Local < ' hir > {
1327
1327
pub pat : & ' hir Pat < ' hir > ,
@@ -1438,7 +1438,7 @@ pub struct BodyId {
1438
1438
#[ derive( Debug , HashStable_Generic ) ]
1439
1439
pub struct Body < ' hir > {
1440
1440
pub params : & ' hir [ Param < ' hir > ] ,
1441
- pub value : Expr < ' hir > ,
1441
+ pub value : & ' hir Expr < ' hir > ,
1442
1442
pub generator_kind : Option < GeneratorKind > ,
1443
1443
}
1444
1444
@@ -2561,23 +2561,23 @@ pub enum TyKind<'hir> {
2561
2561
pub enum InlineAsmOperand < ' hir > {
2562
2562
In {
2563
2563
reg : InlineAsmRegOrRegClass ,
2564
- expr : Expr < ' hir > ,
2564
+ expr : & ' hir Expr < ' hir > ,
2565
2565
} ,
2566
2566
Out {
2567
2567
reg : InlineAsmRegOrRegClass ,
2568
2568
late : bool ,
2569
- expr : Option < Expr < ' hir > > ,
2569
+ expr : Option < & ' hir Expr < ' hir > > ,
2570
2570
} ,
2571
2571
InOut {
2572
2572
reg : InlineAsmRegOrRegClass ,
2573
2573
late : bool ,
2574
- expr : Expr < ' hir > ,
2574
+ expr : & ' hir Expr < ' hir > ,
2575
2575
} ,
2576
2576
SplitInOut {
2577
2577
reg : InlineAsmRegOrRegClass ,
2578
2578
late : bool ,
2579
- in_expr : Expr < ' hir > ,
2580
- out_expr : Option < Expr < ' hir > > ,
2579
+ in_expr : & ' hir Expr < ' hir > ,
2580
+ out_expr : Option < & ' hir Expr < ' hir > > ,
2581
2581
} ,
2582
2582
Const {
2583
2583
anon_const : AnonConst ,
@@ -2991,7 +2991,7 @@ pub enum ItemKind<'hir> {
2991
2991
/// A MBE macro definition (`macro_rules!` or `macro`).
2992
2992
Macro ( ast:: MacroDef , MacroKind ) ,
2993
2993
/// A module.
2994
- Mod ( Mod < ' hir > ) ,
2994
+ Mod ( & ' hir Mod < ' hir > ) ,
2995
2995
/// An external module, e.g. `extern { .. }`.
2996
2996
ForeignMod { abi : Abi , items : & ' hir [ ForeignItemRef ] } ,
2997
2997
/// Module-level inline assembly (from `global_asm!`).
@@ -3495,16 +3495,32 @@ impl<'hir> Node<'hir> {
3495
3495
mod size_asserts {
3496
3496
use super :: * ;
3497
3497
// These are in alphabetical order, which is easy to maintain.
3498
- static_assert_size ! ( Block <' static >, 48 ) ;
3499
- static_assert_size ! ( Expr <' static >, 56 ) ;
3500
- static_assert_size ! ( ForeignItem <' static >, 72 ) ;
3498
+ static_assert_size ! ( Block <' _>, 48 ) ;
3499
+ static_assert_size ! ( Body <' _>, 32 ) ;
3500
+ static_assert_size ! ( Expr <' _>, 56 ) ;
3501
+ static_assert_size ! ( ExprKind <' _>, 40 ) ;
3502
+ static_assert_size ! ( FnDecl <' _>, 40 ) ;
3503
+ static_assert_size ! ( ForeignItem <' _>, 72 ) ;
3504
+ static_assert_size ! ( ForeignItemKind <' _>, 40 ) ;
3505
+ static_assert_size ! ( GenericArg <' _>, 40 ) ;
3501
3506
static_assert_size ! ( GenericBound <' _>, 48 ) ;
3502
- static_assert_size ! ( Generics <' static >, 56 ) ;
3503
- static_assert_size ! ( ImplItem <' static >, 88 ) ;
3504
- static_assert_size ! ( Impl <' static >, 80 ) ;
3505
- static_assert_size ! ( Item <' static >, 80 ) ;
3506
- static_assert_size ! ( Pat <' static >, 88 ) ;
3507
- static_assert_size ! ( QPath <' static >, 24 ) ;
3508
- static_assert_size ! ( TraitItem <' static >, 96 ) ;
3509
- static_assert_size ! ( Ty <' static >, 72 ) ;
3507
+ static_assert_size ! ( Generics <' _>, 56 ) ;
3508
+ static_assert_size ! ( Impl <' _>, 80 ) ;
3509
+ static_assert_size ! ( ImplItem <' _>, 88 ) ;
3510
+ static_assert_size ! ( ImplItemKind <' _>, 40 ) ;
3511
+ static_assert_size ! ( Item <' _>, 80 ) ;
3512
+ static_assert_size ! ( ItemKind <' _>, 48 ) ;
3513
+ static_assert_size ! ( Local <' _>, 64 ) ;
3514
+ static_assert_size ! ( Param <' _>, 32 ) ;
3515
+ static_assert_size ! ( Pat <' _>, 88 ) ;
3516
+ static_assert_size ! ( PatKind <' _>, 64 ) ;
3517
+ static_assert_size ! ( Path <' _>, 48 ) ;
3518
+ static_assert_size ! ( PathSegment <' _>, 56 ) ;
3519
+ static_assert_size ! ( QPath <' _>, 24 ) ;
3520
+ static_assert_size ! ( Stmt <' _>, 32 ) ;
3521
+ static_assert_size ! ( StmtKind <' _>, 16 ) ;
3522
+ static_assert_size ! ( TraitItem <' _>, 96 ) ;
3523
+ static_assert_size ! ( TraitItemKind <' _>, 56 ) ;
3524
+ static_assert_size ! ( Ty <' _>, 72 ) ;
3525
+ static_assert_size ! ( TyKind <' _>, 56 ) ;
3510
3526
}
0 commit comments