@@ -52,7 +52,7 @@ use rustc_data_structures::stable_hasher::StableOrd;
5252use rustc_hashes:: Hash64 ;
5353use rustc_index:: { Idx , IndexSlice , IndexVec } ;
5454#[ cfg( feature = "nightly" ) ]
55- use rustc_macros:: { Decodable_Generic , Encodable_Generic , HashStable_Generic } ;
55+ use rustc_macros:: { Decodable_NoContext , Encodable_NoContext , HashStable_Generic } ;
5656
5757mod callconv;
5858mod layout;
@@ -74,7 +74,10 @@ pub use layout::{LayoutCalculator, LayoutCalculatorError};
7474pub trait HashStableContext { }
7575
7676#[ 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+ ) ]
7881pub struct ReprFlags ( u8 ) ;
7982
8083bitflags ! {
@@ -106,7 +109,10 @@ impl std::fmt::Debug for ReprFlags {
106109}
107110
108111#[ 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+ ) ]
110116pub enum IntegerType {
111117 /// Pointer-sized integer type, i.e. `isize` and `usize`. The field shows signedness, e.g.
112118 /// `Pointer(true)` means `isize`.
@@ -127,7 +133,10 @@ impl IntegerType {
127133
128134/// Represents the repr options provided by the user.
129135#[ 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+ ) ]
131140pub struct ReprOptions {
132141 pub int : Option < IntegerType > ,
133142 pub align : Option < Align > ,
@@ -487,7 +496,10 @@ impl FromStr for Endian {
487496
488497/// Size of a type in bytes.
489498#[ 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+ ) ]
491503pub struct Size {
492504 raw : u64 ,
493505}
@@ -713,7 +725,10 @@ impl Step for Size {
713725
714726/// Alignment of a type in bytes (always a power of two).
715727#[ 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+ ) ]
717732pub struct Align {
718733 pow2 : u8 ,
719734}
@@ -872,7 +887,10 @@ impl AbiAndPrefAlign {
872887
873888/// Integers, also used for enum discriminants.
874889#[ 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+ ) ]
876894pub enum Integer {
877895 I8 ,
878896 I16 ,
0 commit comments