@@ -52,7 +52,7 @@ use rustc_data_structures::stable_hasher::StableOrd;
52
52
use rustc_hashes:: Hash64 ;
53
53
use rustc_index:: { Idx , IndexSlice , IndexVec } ;
54
54
#[ cfg( feature = "nightly" ) ]
55
- use rustc_macros:: { Decodable_Generic , Encodable_Generic , HashStable_Generic } ;
55
+ use rustc_macros:: { Decodable_NoContext , Encodable_NoContext , HashStable_Generic } ;
56
56
57
57
mod callconv;
58
58
mod layout;
@@ -74,7 +74,10 @@ pub use layout::{LayoutCalculator, LayoutCalculatorError};
74
74
pub trait HashStableContext { }
75
75
76
76
#[ derive( Clone , Copy , PartialEq , Eq , Default ) ]
77
- #[ cfg_attr( feature = "nightly" , derive( Encodable_Generic , Decodable_Generic , HashStable_Generic ) ) ]
77
+ #[ cfg_attr(
78
+ feature = "nightly" ,
79
+ derive( Encodable_NoContext , Decodable_NoContext , HashStable_Generic )
80
+ ) ]
78
81
pub struct ReprFlags ( u8 ) ;
79
82
80
83
bitflags ! {
@@ -106,7 +109,10 @@ impl std::fmt::Debug for ReprFlags {
106
109
}
107
110
108
111
#[ derive( Copy , Clone , Debug , Eq , PartialEq ) ]
109
- #[ cfg_attr( feature = "nightly" , derive( Encodable_Generic , Decodable_Generic , HashStable_Generic ) ) ]
112
+ #[ cfg_attr(
113
+ feature = "nightly" ,
114
+ derive( Encodable_NoContext , Decodable_NoContext , HashStable_Generic )
115
+ ) ]
110
116
pub enum IntegerType {
111
117
/// Pointer-sized integer type, i.e. `isize` and `usize`. The field shows signedness, e.g.
112
118
/// `Pointer(true)` means `isize`.
@@ -127,7 +133,10 @@ impl IntegerType {
127
133
128
134
/// Represents the repr options provided by the user.
129
135
#[ derive( Copy , Clone , Debug , Eq , PartialEq , Default ) ]
130
- #[ cfg_attr( feature = "nightly" , derive( Encodable_Generic , Decodable_Generic , HashStable_Generic ) ) ]
136
+ #[ cfg_attr(
137
+ feature = "nightly" ,
138
+ derive( Encodable_NoContext , Decodable_NoContext , HashStable_Generic )
139
+ ) ]
131
140
pub struct ReprOptions {
132
141
pub int : Option < IntegerType > ,
133
142
pub align : Option < Align > ,
@@ -487,7 +496,10 @@ impl FromStr for Endian {
487
496
488
497
/// Size of a type in bytes.
489
498
#[ derive( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ]
490
- #[ cfg_attr( feature = "nightly" , derive( Encodable_Generic , Decodable_Generic , HashStable_Generic ) ) ]
499
+ #[ cfg_attr(
500
+ feature = "nightly" ,
501
+ derive( Encodable_NoContext , Decodable_NoContext , HashStable_Generic )
502
+ ) ]
491
503
pub struct Size {
492
504
raw : u64 ,
493
505
}
@@ -713,7 +725,10 @@ impl Step for Size {
713
725
714
726
/// Alignment of a type in bytes (always a power of two).
715
727
#[ derive( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ]
716
- #[ cfg_attr( feature = "nightly" , derive( Encodable_Generic , Decodable_Generic , HashStable_Generic ) ) ]
728
+ #[ cfg_attr(
729
+ feature = "nightly" ,
730
+ derive( Encodable_NoContext , Decodable_NoContext , HashStable_Generic )
731
+ ) ]
717
732
pub struct Align {
718
733
pow2 : u8 ,
719
734
}
@@ -872,7 +887,10 @@ impl AbiAndPrefAlign {
872
887
873
888
/// Integers, also used for enum discriminants.
874
889
#[ derive( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash , Debug ) ]
875
- #[ cfg_attr( feature = "nightly" , derive( Encodable_Generic , Decodable_Generic , HashStable_Generic ) ) ]
890
+ #[ cfg_attr(
891
+ feature = "nightly" ,
892
+ derive( Encodable_NoContext , Decodable_NoContext , HashStable_Generic )
893
+ ) ]
876
894
pub enum Integer {
877
895
I8 ,
878
896
I16 ,
0 commit comments