@@ -1589,13 +1589,12 @@ rustc_index::newtype_index! {
15891589 /// declared, but a type name in a non-zero universe is a placeholder
15901590 /// type -- an idealized representative of "types in general" that we
15911591 /// use for checking generic functions.
1592+ #[ derive( HashStable ) ]
15921593 pub struct UniverseIndex {
15931594 DEBUG_FORMAT = "U{}" ,
15941595 }
15951596}
15961597
1597- impl_stable_hash_for ! ( struct UniverseIndex { private } ) ;
1598-
15991598impl UniverseIndex {
16001599 pub const ROOT : UniverseIndex = UniverseIndex :: from_u32_const ( 0 ) ;
16011600
@@ -1839,7 +1838,7 @@ bitflags! {
18391838}
18401839
18411840/// Definition of a variant -- a struct's fields or a enum variant.
1842- #[ derive( Debug ) ]
1841+ #[ derive( Debug , HashStable ) ]
18431842pub struct VariantDef {
18441843 /// `DefId` that identifies the variant itself.
18451844 /// If this variant belongs to a struct or union, then this is a copy of its `DefId`.
@@ -1848,6 +1847,7 @@ pub struct VariantDef {
18481847 /// If this variant is a struct variant, then this is `None`.
18491848 pub ctor_def_id : Option < DefId > ,
18501849 /// Variant or struct name.
1850+ #[ stable_hasher( project = name) ]
18511851 pub ident : Ident ,
18521852 /// Discriminant of this variant.
18531853 pub discr : VariantDiscr ,
@@ -1927,17 +1927,6 @@ impl<'tcx> VariantDef {
19271927 }
19281928}
19291929
1930- impl_stable_hash_for ! ( struct VariantDef {
1931- def_id,
1932- ctor_def_id,
1933- ident -> ( ident. name) ,
1934- discr,
1935- fields,
1936- ctor_kind,
1937- flags,
1938- recovered
1939- } ) ;
1940-
19411930#[ derive( Copy , Clone , Debug , PartialEq , Eq , RustcEncodable , RustcDecodable , HashStable ) ]
19421931pub enum VariantDiscr {
19431932 /// Explicit value for this variant, i.e., `X = 123`.
@@ -2061,7 +2050,7 @@ impl Into<DataTypeKind> for AdtKind {
20612050}
20622051
20632052bitflags ! {
2064- #[ derive( RustcEncodable , RustcDecodable , Default ) ]
2053+ #[ derive( RustcEncodable , RustcDecodable , Default , HashStable ) ]
20652054 pub struct ReprFlags : u8 {
20662055 const IS_C = 1 << 0 ;
20672056 const IS_SIMD = 1 << 1 ;
@@ -2076,10 +2065,6 @@ bitflags! {
20762065 }
20772066}
20782067
2079- impl_stable_hash_for ! ( struct ReprFlags {
2080- bits
2081- } ) ;
2082-
20832068/// Represents the repr options provided by the user,
20842069#[ derive( Copy , Clone , Debug , Eq , PartialEq , RustcEncodable , RustcDecodable ,
20852070 Default , HashStable ) ]
0 commit comments