@@ -1589,13 +1589,12 @@ rustc_index::newtype_index! {
1589
1589
/// declared, but a type name in a non-zero universe is a placeholder
1590
1590
/// type -- an idealized representative of "types in general" that we
1591
1591
/// use for checking generic functions.
1592
+ #[ derive( HashStable ) ]
1592
1593
pub struct UniverseIndex {
1593
1594
DEBUG_FORMAT = "U{}" ,
1594
1595
}
1595
1596
}
1596
1597
1597
- impl_stable_hash_for ! ( struct UniverseIndex { private } ) ;
1598
-
1599
1598
impl UniverseIndex {
1600
1599
pub const ROOT : UniverseIndex = UniverseIndex :: from_u32_const ( 0 ) ;
1601
1600
@@ -1839,7 +1838,7 @@ bitflags! {
1839
1838
}
1840
1839
1841
1840
/// Definition of a variant -- a struct's fields or a enum variant.
1842
- #[ derive( Debug ) ]
1841
+ #[ derive( Debug , HashStable ) ]
1843
1842
pub struct VariantDef {
1844
1843
/// `DefId` that identifies the variant itself.
1845
1844
/// If this variant belongs to a struct or union, then this is a copy of its `DefId`.
@@ -1848,6 +1847,7 @@ pub struct VariantDef {
1848
1847
/// If this variant is a struct variant, then this is `None`.
1849
1848
pub ctor_def_id : Option < DefId > ,
1850
1849
/// Variant or struct name.
1850
+ #[ stable_hasher( project = name) ]
1851
1851
pub ident : Ident ,
1852
1852
/// Discriminant of this variant.
1853
1853
pub discr : VariantDiscr ,
@@ -1927,17 +1927,6 @@ impl<'tcx> VariantDef {
1927
1927
}
1928
1928
}
1929
1929
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
-
1941
1930
#[ derive( Copy , Clone , Debug , PartialEq , Eq , RustcEncodable , RustcDecodable , HashStable ) ]
1942
1931
pub enum VariantDiscr {
1943
1932
/// Explicit value for this variant, i.e., `X = 123`.
@@ -2061,7 +2050,7 @@ impl Into<DataTypeKind> for AdtKind {
2061
2050
}
2062
2051
2063
2052
bitflags ! {
2064
- #[ derive( RustcEncodable , RustcDecodable , Default ) ]
2053
+ #[ derive( RustcEncodable , RustcDecodable , Default , HashStable ) ]
2065
2054
pub struct ReprFlags : u8 {
2066
2055
const IS_C = 1 << 0 ;
2067
2056
const IS_SIMD = 1 << 1 ;
@@ -2076,10 +2065,6 @@ bitflags! {
2076
2065
}
2077
2066
}
2078
2067
2079
- impl_stable_hash_for ! ( struct ReprFlags {
2080
- bits
2081
- } ) ;
2082
-
2083
2068
/// Represents the repr options provided by the user,
2084
2069
#[ derive( Copy , Clone , Debug , Eq , PartialEq , RustcEncodable , RustcDecodable ,
2085
2070
Default , HashStable ) ]
0 commit comments