@@ -34,6 +34,7 @@ use crate::intravisit::FnKind;
34
34
35
35
#[ derive( Debug , Copy , Clone , HashStable_Generic ) ]
36
36
pub struct Lifetime {
37
+ #[ stable_hasher( ignore) ]
37
38
pub hir_id : HirId ,
38
39
39
40
/// Either "`'a`", referring to a named lifetime definition,
@@ -214,6 +215,7 @@ impl Path<'_> {
214
215
pub struct PathSegment < ' hir > {
215
216
/// The identifier portion of this path segment.
216
217
pub ident : Ident ,
218
+ #[ stable_hasher( ignore) ]
217
219
pub hir_id : HirId ,
218
220
pub res : Res ,
219
221
@@ -304,6 +306,7 @@ pub enum ConstArgKind<'hir> {
304
306
305
307
#[ derive( Clone , Copy , Debug , HashStable_Generic ) ]
306
308
pub struct InferArg {
309
+ #[ stable_hasher( ignore) ]
307
310
pub hir_id : HirId ,
308
311
pub span : Span ,
309
312
}
@@ -592,6 +595,7 @@ pub enum GenericParamKind<'hir> {
592
595
593
596
#[ derive( Debug , Clone , Copy , HashStable_Generic ) ]
594
597
pub struct GenericParam < ' hir > {
598
+ #[ stable_hasher( ignore) ]
595
599
pub hir_id : HirId ,
596
600
pub def_id : LocalDefId ,
597
601
pub name : ParamName ,
@@ -850,6 +854,7 @@ impl<'hir> Generics<'hir> {
850
854
/// A single predicate in a where-clause.
851
855
#[ derive( Debug , Clone , Copy , HashStable_Generic ) ]
852
856
pub struct WherePredicate < ' hir > {
857
+ #[ stable_hasher( ignore) ]
853
858
pub hir_id : HirId ,
854
859
pub span : Span ,
855
860
pub kind : & ' hir WherePredicateKind < ' hir > ,
@@ -1521,6 +1526,7 @@ impl fmt::Debug for DotDotPos {
1521
1526
1522
1527
#[ derive( Debug , Clone , Copy , HashStable_Generic ) ]
1523
1528
pub struct PatExpr < ' hir > {
1529
+ #[ stable_hasher( ignore) ]
1524
1530
pub hir_id : HirId ,
1525
1531
pub span : Span ,
1526
1532
pub kind : PatExprKind < ' hir > ,
@@ -1610,6 +1616,7 @@ pub enum PatKind<'hir> {
1610
1616
/// A statement.
1611
1617
#[ derive( Debug , Clone , Copy , HashStable_Generic ) ]
1612
1618
pub struct Stmt < ' hir > {
1619
+ #[ stable_hasher( ignore) ]
1613
1620
pub hir_id : HirId ,
1614
1621
pub kind : StmtKind < ' hir > ,
1615
1622
pub span : Span ,
@@ -1641,6 +1648,7 @@ pub struct LetStmt<'hir> {
1641
1648
pub init : Option < & ' hir Expr < ' hir > > ,
1642
1649
/// Else block for a `let...else` binding.
1643
1650
pub els : Option < & ' hir Block < ' hir > > ,
1651
+ #[ stable_hasher( ignore) ]
1644
1652
pub hir_id : HirId ,
1645
1653
pub span : Span ,
1646
1654
/// Can be `ForLoopDesugar` if the `let` statement is part of a `for` loop
@@ -1937,6 +1945,7 @@ pub type Lit = Spanned<LitKind>;
1937
1945
/// `const N: usize = { ... }` with `tcx.hir().opt_const_param_default_param_def_id(..)`
1938
1946
#[ derive( Copy , Clone , Debug , HashStable_Generic ) ]
1939
1947
pub struct AnonConst {
1948
+ #[ stable_hasher( ignore) ]
1940
1949
pub hir_id : HirId ,
1941
1950
pub def_id : LocalDefId ,
1942
1951
pub body : BodyId ,
@@ -1946,6 +1955,7 @@ pub struct AnonConst {
1946
1955
/// An inline constant expression `const { something }`.
1947
1956
#[ derive( Copy , Clone , Debug , HashStable_Generic ) ]
1948
1957
pub struct ConstBlock {
1958
+ #[ stable_hasher( ignore) ]
1949
1959
pub hir_id : HirId ,
1950
1960
pub def_id : LocalDefId ,
1951
1961
pub body : BodyId ,
@@ -1961,6 +1971,7 @@ pub struct ConstBlock {
1961
1971
/// [rust lang reference]: https://doc.rust-lang.org/reference/expressions.html
1962
1972
#[ derive( Debug , Clone , Copy , HashStable_Generic ) ]
1963
1973
pub struct Expr < ' hir > {
1974
+ #[ stable_hasher( ignore) ]
1964
1975
pub hir_id : HirId ,
1965
1976
pub kind : ExprKind < ' hir > ,
1966
1977
pub span : Span ,
@@ -2839,6 +2850,7 @@ pub enum ImplItemKind<'hir> {
2839
2850
/// * the `f(..): Bound` in `Trait<f(..): Bound>` (feature `return_type_notation`)
2840
2851
#[ derive( Debug , Clone , Copy , HashStable_Generic ) ]
2841
2852
pub struct AssocItemConstraint < ' hir > {
2853
+ #[ stable_hasher( ignore) ]
2842
2854
pub hir_id : HirId ,
2843
2855
pub ident : Ident ,
2844
2856
pub gen_args : & ' hir GenericArgs < ' hir > ,
@@ -2907,6 +2919,7 @@ impl<'hir> AssocItemConstraintKind<'hir> {
2907
2919
2908
2920
#[ derive( Debug , Clone , Copy , HashStable_Generic ) ]
2909
2921
pub struct Ty < ' hir > {
2922
+ #[ stable_hasher( ignore) ]
2910
2923
pub hir_id : HirId ,
2911
2924
pub kind : TyKind < ' hir > ,
2912
2925
pub span : Span ,
@@ -3102,6 +3115,7 @@ pub struct UnsafeBinderTy<'hir> {
3102
3115
3103
3116
#[ derive( Debug , Clone , Copy , HashStable_Generic ) ]
3104
3117
pub struct OpaqueTy < ' hir > {
3118
+ #[ stable_hasher( ignore) ]
3105
3119
pub hir_id : HirId ,
3106
3120
pub def_id : LocalDefId ,
3107
3121
pub bounds : GenericBounds < ' hir > ,
@@ -3138,6 +3152,7 @@ impl PreciseCapturingArg<'_> {
3138
3152
/// since resolve_bound_vars operates on `Lifetime`s.
3139
3153
#[ derive( Debug , Clone , Copy , HashStable_Generic ) ]
3140
3154
pub struct PreciseCapturingNonLifetimeArg {
3155
+ #[ stable_hasher( ignore) ]
3141
3156
pub hir_id : HirId ,
3142
3157
pub ident : Ident ,
3143
3158
pub res : Res ,
@@ -3311,6 +3326,7 @@ impl InlineAsm<'_> {
3311
3326
/// Represents a parameter in a function header.
3312
3327
#[ derive( Debug , Clone , Copy , HashStable_Generic ) ]
3313
3328
pub struct Param < ' hir > {
3329
+ #[ stable_hasher( ignore) ]
3314
3330
pub hir_id : HirId ,
3315
3331
pub pat : & ' hir Pat < ' hir > ,
3316
3332
pub ty_span : Span ,
@@ -3468,6 +3484,7 @@ pub struct Variant<'hir> {
3468
3484
/// Name of the variant.
3469
3485
pub ident : Ident ,
3470
3486
/// Id of the variant (not the constructor, see `VariantData::ctor_hir_id()`).
3487
+ #[ stable_hasher( ignore) ]
3471
3488
pub hir_id : HirId ,
3472
3489
pub def_id : LocalDefId ,
3473
3490
/// Fields and constructor id of the variant.
@@ -3540,6 +3557,7 @@ pub struct FieldDef<'hir> {
3540
3557
pub span : Span ,
3541
3558
pub vis_span : Span ,
3542
3559
pub ident : Ident ,
3560
+ #[ stable_hasher( ignore) ]
3543
3561
pub hir_id : HirId ,
3544
3562
pub def_id : LocalDefId ,
3545
3563
pub ty : & ' hir Ty < ' hir > ,
@@ -3564,11 +3582,11 @@ pub enum VariantData<'hir> {
3564
3582
/// A tuple variant.
3565
3583
///
3566
3584
/// E.g., `Bar(..)` as in `enum Foo { Bar(..) }`.
3567
- Tuple ( & ' hir [ FieldDef < ' hir > ] , HirId , LocalDefId ) ,
3585
+ Tuple ( & ' hir [ FieldDef < ' hir > ] , # [ stable_hasher ( ignore ) ] HirId , LocalDefId ) ,
3568
3586
/// A unit variant.
3569
3587
///
3570
3588
/// E.g., `Bar = ..` as in `enum Foo { Bar = .. }`.
3571
- Unit ( HirId , LocalDefId ) ,
3589
+ Unit ( # [ stable_hasher ( ignore ) ] HirId , LocalDefId ) ,
3572
3590
}
3573
3591
3574
3592
impl < ' hir > VariantData < ' hir > {
0 commit comments