@@ -26,7 +26,7 @@ use rustc_target::spec::abi::Abi;
26
26
use smallvec:: SmallVec ;
27
27
use std:: fmt;
28
28
29
- #[ derive( Debug , Copy , Clone , Encodable , HashStable_Generic ) ]
29
+ #[ derive( Debug , Copy , Clone , HashStable_Generic ) ]
30
30
pub struct Lifetime {
31
31
pub hir_id : HirId ,
32
32
@@ -41,8 +41,7 @@ pub struct Lifetime {
41
41
pub res : LifetimeName ,
42
42
}
43
43
44
- #[ derive( Debug , Clone , PartialEq , Eq , Encodable , Hash , Copy ) ]
45
- #[ derive( HashStable_Generic ) ]
44
+ #[ derive( Debug , Copy , Clone , HashStable_Generic ) ]
46
45
pub enum ParamName {
47
46
/// Some user-given name like `T` or `'x`.
48
47
Plain ( Ident ) ,
@@ -85,8 +84,7 @@ impl ParamName {
85
84
}
86
85
}
87
86
88
- #[ derive( Debug , Clone , PartialEq , Eq , Encodable , Hash , Copy ) ]
89
- #[ derive( HashStable_Generic ) ]
87
+ #[ derive( Debug , Copy , Clone , PartialEq , Eq , HashStable_Generic ) ]
90
88
pub enum LifetimeName {
91
89
/// User-given names or fresh (synthetic) names.
92
90
Param ( LocalDefId ) ,
@@ -243,13 +241,13 @@ impl<'hir> PathSegment<'hir> {
243
241
}
244
242
}
245
243
246
- #[ derive( Encodable , Clone , Copy , Debug , HashStable_Generic ) ]
244
+ #[ derive( Clone , Copy , Debug , HashStable_Generic ) ]
247
245
pub struct ConstArg {
248
246
pub value : AnonConst ,
249
247
pub span : Span ,
250
248
}
251
249
252
- #[ derive( Encodable , Clone , Copy , Debug , HashStable_Generic ) ]
250
+ #[ derive( Clone , Copy , Debug , HashStable_Generic ) ]
253
251
pub struct InferArg {
254
252
pub hir_id : HirId ,
255
253
pub span : Span ,
@@ -422,8 +420,7 @@ impl<'hir> GenericArgs<'hir> {
422
420
}
423
421
}
424
422
425
- #[ derive( Copy , Clone , PartialEq , Eq , Encodable , Hash , Debug ) ]
426
- #[ derive( HashStable_Generic ) ]
423
+ #[ derive( Copy , Clone , PartialEq , Eq , Debug , HashStable_Generic ) ]
427
424
pub enum GenericArgsParentheses {
428
425
No ,
429
426
/// Bounds for `feature(return_type_notation)`, like `T: Trait<method(..): Send>`,
@@ -435,8 +432,7 @@ pub enum GenericArgsParentheses {
435
432
436
433
/// A modifier on a bound, currently this is only used for `?Sized`, where the
437
434
/// modifier is `Maybe`. Negative bounds should also be handled here.
438
- #[ derive( Copy , Clone , PartialEq , Eq , Encodable , Hash , Debug ) ]
439
- #[ derive( HashStable_Generic ) ]
435
+ #[ derive( Copy , Clone , PartialEq , Eq , Hash , Debug , HashStable_Generic ) ]
440
436
pub enum TraitBoundModifier {
441
437
None ,
442
438
Maybe ,
@@ -474,7 +470,7 @@ impl GenericBound<'_> {
474
470
475
471
pub type GenericBounds < ' hir > = & ' hir [ GenericBound < ' hir > ] ;
476
472
477
- #[ derive( Copy , Clone , PartialEq , Eq , Encodable , Debug , HashStable_Generic ) ]
473
+ #[ derive( Copy , Clone , Debug , HashStable_Generic ) ]
478
474
pub enum LifetimeParamKind {
479
475
// Indicates that the lifetime definition was explicitly declared (e.g., in
480
476
// `fn foo<'a>(x: &'a u8) -> &'a u8 { x }`).
@@ -539,7 +535,7 @@ impl<'hir> GenericParam<'hir> {
539
535
/// early-bound (but can be a late-bound lifetime in functions, for example),
540
536
/// or from a `for<...>` binder, in which case it's late-bound (and notably,
541
537
/// does not show up in the parent item's generics).
542
- #[ derive( Debug , HashStable_Generic , PartialEq , Eq , Copy , Clone ) ]
538
+ #[ derive( Debug , Clone , Copy , HashStable_Generic ) ]
543
539
pub enum GenericParamSource {
544
540
// Early or late-bound parameters defined on an item
545
541
Generics ,
@@ -1097,7 +1093,7 @@ pub struct PatField<'hir> {
1097
1093
pub span : Span ,
1098
1094
}
1099
1095
1100
- #[ derive( Copy , Clone , PartialEq , Encodable , Debug , HashStable_Generic ) ]
1096
+ #[ derive( Copy , Clone , PartialEq , Debug , HashStable_Generic ) ]
1101
1097
pub enum RangeEnd {
1102
1098
Included ,
1103
1099
Excluded ,
@@ -1197,7 +1193,7 @@ pub enum PatKind<'hir> {
1197
1193
Slice ( & ' hir [ Pat < ' hir > ] , Option < & ' hir Pat < ' hir > > , & ' hir [ Pat < ' hir > ] ) ,
1198
1194
}
1199
1195
1200
- #[ derive( Copy , Clone , PartialEq , Encodable , Debug , HashStable_Generic ) ]
1196
+ #[ derive( Copy , Clone , PartialEq , Debug , HashStable_Generic ) ]
1201
1197
pub enum BinOpKind {
1202
1198
/// The `+` operator (addition).
1203
1199
Add ,
@@ -1325,7 +1321,7 @@ impl Into<ast::BinOpKind> for BinOpKind {
1325
1321
1326
1322
pub type BinOp = Spanned < BinOpKind > ;
1327
1323
1328
- #[ derive( Copy , Clone , PartialEq , Encodable , Debug , HashStable_Generic ) ]
1324
+ #[ derive( Copy , Clone , PartialEq , Debug , HashStable_Generic ) ]
1329
1325
pub enum UnOp {
1330
1326
/// The `*` operator (dereferencing).
1331
1327
Deref ,
@@ -1450,19 +1446,19 @@ pub struct ExprField<'hir> {
1450
1446
pub is_shorthand : bool ,
1451
1447
}
1452
1448
1453
- #[ derive( Copy , Clone , PartialEq , Encodable , Debug , HashStable_Generic ) ]
1449
+ #[ derive( Copy , Clone , PartialEq , Debug , HashStable_Generic ) ]
1454
1450
pub enum BlockCheckMode {
1455
1451
DefaultBlock ,
1456
1452
UnsafeBlock ( UnsafeSource ) ,
1457
1453
}
1458
1454
1459
- #[ derive( Copy , Clone , PartialEq , Encodable , Debug , HashStable_Generic ) ]
1455
+ #[ derive( Copy , Clone , PartialEq , Debug , HashStable_Generic ) ]
1460
1456
pub enum UnsafeSource {
1461
1457
CompilerGenerated ,
1462
1458
UserProvided ,
1463
1459
}
1464
1460
1465
- #[ derive( Copy , Clone , PartialEq , Eq , Encodable , Decodable , Hash , Debug ) ]
1461
+ #[ derive( Copy , Clone , PartialEq , Eq , Hash , Debug ) ]
1466
1462
pub struct BodyId {
1467
1463
pub hir_id : HirId ,
1468
1464
}
@@ -1506,7 +1502,7 @@ impl<'hir> Body<'hir> {
1506
1502
}
1507
1503
1508
1504
/// The type of source expression that caused this generator to be created.
1509
- #[ derive( Clone , PartialEq , PartialOrd , Eq , Hash , Debug , Copy ) ]
1505
+ #[ derive( Clone , PartialEq , Eq , Debug , Copy , Hash ) ]
1510
1506
#[ derive( HashStable_Generic , Encodable , Decodable ) ]
1511
1507
pub enum GeneratorKind {
1512
1508
/// An explicit `async` block or the body of an async function.
@@ -1539,7 +1535,7 @@ impl GeneratorKind {
1539
1535
///
1540
1536
/// This helps error messages but is also used to drive coercions in
1541
1537
/// type-checking (see #60424).
1542
- #[ derive( Clone , PartialEq , PartialOrd , Eq , Hash , Debug , Copy ) ]
1538
+ #[ derive( Clone , PartialEq , Eq , Hash , Debug , Copy ) ]
1543
1539
#[ derive( HashStable_Generic , Encodable , Decodable ) ]
1544
1540
pub enum AsyncGeneratorKind {
1545
1541
/// An explicit `async` block written by the user.
@@ -1649,7 +1645,7 @@ impl fmt::Display for ConstContext {
1649
1645
/// A literal.
1650
1646
pub type Lit = Spanned < LitKind > ;
1651
1647
1652
- #[ derive( Copy , Clone , PartialEq , Eq , Encodable , Debug , HashStable_Generic ) ]
1648
+ #[ derive( Copy , Clone , Debug , HashStable_Generic ) ]
1653
1649
pub enum ArrayLen {
1654
1650
Infer ( HirId , Span ) ,
1655
1651
Body ( AnonConst ) ,
@@ -1671,7 +1667,7 @@ impl ArrayLen {
1671
1667
///
1672
1668
/// You can check if this anon const is a default in a const param
1673
1669
/// `const N: usize = { ... }` with `tcx.hir().opt_const_param_default_param_def_id(..)`
1674
- #[ derive( Copy , Clone , PartialEq , Eq , Encodable , Debug , HashStable_Generic ) ]
1670
+ #[ derive( Copy , Clone , Debug , HashStable_Generic ) ]
1675
1671
pub struct AnonConst {
1676
1672
pub hir_id : HirId ,
1677
1673
pub def_id : LocalDefId ,
@@ -2105,7 +2101,7 @@ impl<'hir> QPath<'hir> {
2105
2101
}
2106
2102
2107
2103
/// Hints at the original code for a let statement.
2108
- #[ derive( Copy , Clone , Encodable , Debug , HashStable_Generic ) ]
2104
+ #[ derive( Copy , Clone , Debug , HashStable_Generic ) ]
2109
2105
pub enum LocalSource {
2110
2106
/// A `match _ { .. }`.
2111
2107
Normal ,
@@ -2158,7 +2154,7 @@ impl MatchSource {
2158
2154
}
2159
2155
2160
2156
/// The loop type that yielded an `ExprKind::Loop`.
2161
- #[ derive( Copy , Clone , PartialEq , Encodable , Debug , HashStable_Generic ) ]
2157
+ #[ derive( Copy , Clone , PartialEq , Debug , HashStable_Generic ) ]
2162
2158
pub enum LoopSource {
2163
2159
/// A `loop { .. }` loop.
2164
2160
Loop ,
@@ -2178,7 +2174,7 @@ impl LoopSource {
2178
2174
}
2179
2175
}
2180
2176
2181
- #[ derive( Copy , Clone , Encodable , Debug , HashStable_Generic ) ]
2177
+ #[ derive( Copy , Clone , Debug , HashStable_Generic ) ]
2182
2178
pub enum LoopIdError {
2183
2179
OutsideLoopScope ,
2184
2180
UnlabeledCfInWhileCondition ,
@@ -2197,7 +2193,7 @@ impl fmt::Display for LoopIdError {
2197
2193
}
2198
2194
}
2199
2195
2200
- #[ derive( Copy , Clone , Encodable , Debug , HashStable_Generic ) ]
2196
+ #[ derive( Copy , Clone , Debug , HashStable_Generic ) ]
2201
2197
pub struct Destination {
2202
2198
/// This is `Some(_)` iff there is an explicit user-specified 'label
2203
2199
pub label : Option < Label > ,
@@ -2208,7 +2204,7 @@ pub struct Destination {
2208
2204
}
2209
2205
2210
2206
/// The yield kind that caused an `ExprKind::Yield`.
2211
- #[ derive( Copy , Clone , PartialEq , Eq , Debug , Encodable , Decodable , HashStable_Generic ) ]
2207
+ #[ derive( Copy , Clone , Debug , HashStable_Generic ) ]
2212
2208
pub enum YieldSource {
2213
2209
/// An `<expr>.await`.
2214
2210
Await { expr : Option < HirId > } ,
@@ -2327,7 +2323,7 @@ impl<'hir> TraitItem<'hir> {
2327
2323
}
2328
2324
2329
2325
/// Represents a trait method's body (or just argument names).
2330
- #[ derive( Encodable , Debug , Clone , Copy , HashStable_Generic ) ]
2326
+ #[ derive( Debug , Clone , Copy , HashStable_Generic ) ]
2331
2327
pub enum TraitFn < ' hir > {
2332
2328
/// No default body in the trait, just a signature.
2333
2329
Required ( & ' hir [ Ident ] ) ,
@@ -2658,7 +2654,7 @@ pub struct OpaqueTy<'hir> {
2658
2654
}
2659
2655
2660
2656
/// From whence the opaque type came.
2661
- #[ derive( Copy , Clone , PartialEq , Eq , Encodable , Decodable , Debug , HashStable_Generic ) ]
2657
+ #[ derive( Copy , Clone , PartialEq , Eq , Debug , HashStable_Generic ) ]
2662
2658
pub enum OpaqueTyOrigin {
2663
2659
/// `-> impl Trait`
2664
2660
FnReturn ( LocalDefId ) ,
@@ -2818,7 +2814,7 @@ impl ImplicitSelfKind {
2818
2814
}
2819
2815
}
2820
2816
2821
- #[ derive( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Encodable , Decodable , Debug ) ]
2817
+ #[ derive( Copy , Clone , PartialEq , Eq , Encodable , Decodable , Debug ) ]
2822
2818
#[ derive( HashStable_Generic ) ]
2823
2819
pub enum IsAsync {
2824
2820
Async ,
@@ -2831,7 +2827,7 @@ impl IsAsync {
2831
2827
}
2832
2828
}
2833
2829
2834
- #[ derive( Copy , Clone , PartialEq , Eq , Hash , Debug , Encodable , Decodable , HashStable_Generic ) ]
2830
+ #[ derive( Copy , Clone , PartialEq , Eq , Debug , Encodable , Decodable , HashStable_Generic ) ]
2835
2831
pub enum Defaultness {
2836
2832
Default { has_value : bool } ,
2837
2833
Final ,
@@ -2887,13 +2883,13 @@ pub enum ClosureBinder {
2887
2883
For { span : Span } ,
2888
2884
}
2889
2885
2890
- #[ derive( Encodable , Debug , Clone , Copy , HashStable_Generic ) ]
2886
+ #[ derive( Debug , Clone , Copy , HashStable_Generic ) ]
2891
2887
pub struct Mod < ' hir > {
2892
2888
pub spans : ModSpans ,
2893
2889
pub item_ids : & ' hir [ ItemId ] ,
2894
2890
}
2895
2891
2896
- #[ derive( Copy , Clone , Debug , HashStable_Generic , Encodable ) ]
2892
+ #[ derive( Copy , Clone , Debug , HashStable_Generic ) ]
2897
2893
pub struct ModSpans {
2898
2894
/// A span from the first token past `{` to the last token until `}`.
2899
2895
/// For `mod foo;`, the inner span ranges from the first token
@@ -2922,7 +2918,7 @@ pub struct Variant<'hir> {
2922
2918
pub span : Span ,
2923
2919
}
2924
2920
2925
- #[ derive( Copy , Clone , PartialEq , Encodable , Debug , HashStable_Generic ) ]
2921
+ #[ derive( Copy , Clone , PartialEq , Debug , HashStable_Generic ) ]
2926
2922
pub enum UseKind {
2927
2923
/// One import, e.g., `use foo::bar` or `use foo::bar as baz`.
2928
2924
/// Also produced for each element of a list `use`, e.g.
@@ -3233,7 +3229,7 @@ impl fmt::Display for Unsafety {
3233
3229
}
3234
3230
}
3235
3231
3236
- #[ derive( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash , Debug ) ]
3232
+ #[ derive( Copy , Clone , PartialEq , Eq , Debug ) ]
3237
3233
#[ derive( Encodable , Decodable , HashStable_Generic ) ]
3238
3234
pub enum Constness {
3239
3235
Const ,
@@ -3249,7 +3245,7 @@ impl fmt::Display for Constness {
3249
3245
}
3250
3246
}
3251
3247
3252
- #[ derive( Copy , Clone , Encodable , Debug , HashStable_Generic ) ]
3248
+ #[ derive( Copy , Clone , Debug , HashStable_Generic ) ]
3253
3249
pub struct FnHeader {
3254
3250
pub unsafety : Unsafety ,
3255
3251
pub constness : Constness ,
@@ -3381,7 +3377,7 @@ impl ItemKind<'_> {
3381
3377
/// type or method, and whether it is public). This allows other
3382
3378
/// passes to find the impl they want without loading the ID (which
3383
3379
/// means fewer edges in the incremental compilation graph).
3384
- #[ derive( Encodable , Debug , Clone , Copy , HashStable_Generic ) ]
3380
+ #[ derive( Debug , Clone , Copy , HashStable_Generic ) ]
3385
3381
pub struct TraitItemRef {
3386
3382
pub id : TraitItemId ,
3387
3383
pub ident : Ident ,
@@ -3405,7 +3401,7 @@ pub struct ImplItemRef {
3405
3401
pub trait_item_def_id : Option < DefId > ,
3406
3402
}
3407
3403
3408
- #[ derive( Copy , Clone , PartialEq , Encodable , Debug , HashStable_Generic ) ]
3404
+ #[ derive( Copy , Clone , PartialEq , Debug , HashStable_Generic ) ]
3409
3405
pub enum AssocItemKind {
3410
3406
Const ,
3411
3407
Fn { has_self : bool } ,
@@ -3474,7 +3470,7 @@ pub enum ForeignItemKind<'hir> {
3474
3470
}
3475
3471
3476
3472
/// A variable captured by a closure.
3477
- #[ derive( Debug , Copy , Clone , Encodable , HashStable_Generic ) ]
3473
+ #[ derive( Debug , Copy , Clone , HashStable_Generic ) ]
3478
3474
pub struct Upvar {
3479
3475
/// First span where it is accessed (there can be multiple).
3480
3476
pub span : Span ,
@@ -3483,7 +3479,7 @@ pub struct Upvar {
3483
3479
// The TraitCandidate's import_ids is empty if the trait is defined in the same module, and
3484
3480
// has length > 0 if the trait is found through an chain of imports, starting with the
3485
3481
// import/use statement in the scope where the trait is used.
3486
- #[ derive( Encodable , Decodable , Debug , Clone , HashStable_Generic ) ]
3482
+ #[ derive( Debug , Clone , HashStable_Generic ) ]
3487
3483
pub struct TraitCandidate {
3488
3484
pub def_id : DefId ,
3489
3485
pub import_ids : SmallVec < [ LocalDefId ; 1 ] > ,
0 commit comments