@@ -594,7 +594,7 @@ impl SourceInfo {
594594// Borrow kinds
595595
596596#[ derive( Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , TyEncodable , TyDecodable ) ]
597- #[ derive( HashStable ) ]
597+ #[ derive( Hash , HashStable ) ]
598598pub enum BorrowKind {
599599 /// Data must be immutable and is aliasable.
600600 Shared ,
@@ -1163,7 +1163,7 @@ pub struct BasicBlockData<'tcx> {
11631163}
11641164
11651165/// Information about an assertion failure.
1166- #[ derive( Clone , TyEncodable , TyDecodable , HashStable , PartialEq ) ]
1166+ #[ derive( Clone , TyEncodable , TyDecodable , Hash , HashStable , PartialEq , PartialOrd ) ]
11671167pub enum AssertKind < O > {
11681168 BoundsCheck { len : O , index : O } ,
11691169 Overflow ( BinOp , O , O ) ,
@@ -1174,7 +1174,17 @@ pub enum AssertKind<O> {
11741174 ResumedAfterPanic ( GeneratorKind ) ,
11751175}
11761176
1177- #[ derive( Clone , Debug , PartialEq , TyEncodable , TyDecodable , HashStable , TypeFoldable ) ]
1177+ #[ derive(
1178+ Clone ,
1179+ Debug ,
1180+ PartialEq ,
1181+ PartialOrd ,
1182+ TyEncodable ,
1183+ TyDecodable ,
1184+ Hash ,
1185+ HashStable ,
1186+ TypeFoldable
1187+ ) ]
11781188pub enum InlineAsmOperand < ' tcx > {
11791189 In {
11801190 reg : InlineAsmRegOrRegClass ,
@@ -1449,7 +1459,7 @@ impl Statement<'_> {
14491459 }
14501460}
14511461
1452- #[ derive( Clone , Debug , PartialEq , TyEncodable , TyDecodable , HashStable , TypeFoldable ) ]
1462+ #[ derive( Clone , Debug , PartialEq , TyEncodable , TyDecodable , Hash , HashStable , TypeFoldable ) ]
14531463pub enum StatementKind < ' tcx > {
14541464 /// Write the RHS Rvalue to the LHS Place.
14551465 Assign ( Box < ( Place < ' tcx > , Rvalue < ' tcx > ) > ) ,
@@ -1517,7 +1527,7 @@ impl<'tcx> StatementKind<'tcx> {
15171527}
15181528
15191529/// Describes what kind of retag is to be performed.
1520- #[ derive( Copy , Clone , TyEncodable , TyDecodable , Debug , PartialEq , Eq , HashStable ) ]
1530+ #[ derive( Copy , Clone , TyEncodable , TyDecodable , Debug , PartialEq , Eq , Hash , HashStable ) ]
15211531pub enum RetagKind {
15221532 /// The initial retag when entering a function.
15231533 FnEntry ,
@@ -1530,7 +1540,7 @@ pub enum RetagKind {
15301540}
15311541
15321542/// The `FakeReadCause` describes the type of pattern why a FakeRead statement exists.
1533- #[ derive( Copy , Clone , TyEncodable , TyDecodable , Debug , HashStable , PartialEq ) ]
1543+ #[ derive( Copy , Clone , TyEncodable , TyDecodable , Debug , Hash , HashStable , PartialEq ) ]
15341544pub enum FakeReadCause {
15351545 /// Inject a fake read of the borrowed input at the end of each guards
15361546 /// code.
@@ -1572,7 +1582,7 @@ pub enum FakeReadCause {
15721582 ForIndex ,
15731583}
15741584
1575- #[ derive( Clone , Debug , PartialEq , TyEncodable , TyDecodable , HashStable , TypeFoldable ) ]
1585+ #[ derive( Clone , Debug , PartialEq , TyEncodable , TyDecodable , Hash , HashStable , TypeFoldable ) ]
15761586pub struct LlvmInlineAsm < ' tcx > {
15771587 pub asm : hir:: LlvmInlineAsmInner ,
15781588 pub outputs : Box < [ Place < ' tcx > ] > ,
@@ -1619,7 +1629,7 @@ impl Debug for Statement<'_> {
16191629 }
16201630}
16211631
1622- #[ derive( Clone , Debug , PartialEq , TyEncodable , TyDecodable , HashStable , TypeFoldable ) ]
1632+ #[ derive( Clone , Debug , PartialEq , TyEncodable , TyDecodable , Hash , HashStable , TypeFoldable ) ]
16231633pub struct Coverage {
16241634 pub kind : CoverageKind ,
16251635 pub code_region : Option < CodeRegion > ,
@@ -1915,7 +1925,7 @@ pub struct SourceScopeLocalData {
19151925
19161926/// These are values that can appear inside an rvalue. They are intentionally
19171927/// limited to prevent rvalues from being nested in one another.
1918- #[ derive( Clone , PartialEq , TyEncodable , TyDecodable , HashStable ) ]
1928+ #[ derive( Clone , PartialEq , PartialOrd , TyEncodable , TyDecodable , Hash , HashStable ) ]
19191929pub enum Operand < ' tcx > {
19201930 /// Copy: The value must be available for use afterwards.
19211931 ///
@@ -2023,7 +2033,7 @@ impl<'tcx> Operand<'tcx> {
20232033///////////////////////////////////////////////////////////////////////////
20242034/// Rvalues
20252035
2026- #[ derive( Clone , TyEncodable , TyDecodable , HashStable , PartialEq ) ]
2036+ #[ derive( Clone , TyEncodable , TyDecodable , Hash , HashStable , PartialEq ) ]
20272037pub enum Rvalue < ' tcx > {
20282038 /// x (either a move or copy, depending on type of x)
20292039 Use ( Operand < ' tcx > ) ,
@@ -2069,13 +2079,13 @@ pub enum Rvalue<'tcx> {
20692079 Aggregate ( Box < AggregateKind < ' tcx > > , Vec < Operand < ' tcx > > ) ,
20702080}
20712081
2072- #[ derive( Clone , Copy , Debug , PartialEq , Eq , TyEncodable , TyDecodable , HashStable ) ]
2082+ #[ derive( Clone , Copy , Debug , PartialEq , Eq , TyEncodable , TyDecodable , Hash , HashStable ) ]
20732083pub enum CastKind {
20742084 Misc ,
20752085 Pointer ( PointerCast ) ,
20762086}
20772087
2078- #[ derive( Clone , Debug , PartialEq , Eq , TyEncodable , TyDecodable , HashStable ) ]
2088+ #[ derive( Clone , Debug , PartialEq , Eq , TyEncodable , TyDecodable , Hash , HashStable ) ]
20792089pub enum AggregateKind < ' tcx > {
20802090 /// The type is of the element
20812091 Array ( Ty < ' tcx > ) ,
@@ -2092,7 +2102,7 @@ pub enum AggregateKind<'tcx> {
20922102 Generator ( DefId , SubstsRef < ' tcx > , hir:: Movability ) ,
20932103}
20942104
2095- #[ derive( Copy , Clone , Debug , PartialEq , Eq , TyEncodable , TyDecodable , HashStable ) ]
2105+ #[ derive( Copy , Clone , Debug , PartialEq , PartialOrd , Eq , TyEncodable , TyDecodable , Hash , HashStable ) ]
20962106pub enum BinOp {
20972107 /// The `+` operator (addition)
20982108 Add ,
@@ -2137,15 +2147,15 @@ impl BinOp {
21372147 }
21382148}
21392149
2140- #[ derive( Copy , Clone , Debug , PartialEq , Eq , TyEncodable , TyDecodable , HashStable ) ]
2150+ #[ derive( Copy , Clone , Debug , PartialEq , Eq , TyEncodable , TyDecodable , Hash , HashStable ) ]
21412151pub enum NullOp {
21422152 /// Returns the size of a value of that type
21432153 SizeOf ,
21442154 /// Creates a new uninitialized box for a value of that type
21452155 Box ,
21462156}
21472157
2148- #[ derive( Copy , Clone , Debug , PartialEq , Eq , TyEncodable , TyDecodable , HashStable ) ]
2158+ #[ derive( Copy , Clone , Debug , PartialEq , Eq , TyEncodable , TyDecodable , Hash , HashStable ) ]
21492159pub enum UnOp {
21502160 /// The `!` operator for logical inversion
21512161 Not ,
@@ -2315,7 +2325,7 @@ impl<'tcx> Debug for Rvalue<'tcx> {
23152325/// this does not necessarily mean that they are `==` in Rust. In
23162326/// particular, one must be wary of `NaN`!
23172327
2318- #[ derive( Clone , Copy , PartialEq , TyEncodable , TyDecodable , HashStable ) ]
2328+ #[ derive( Clone , Copy , PartialEq , PartialOrd , TyEncodable , TyDecodable , Hash , HashStable ) ]
23192329pub struct Constant < ' tcx > {
23202330 pub span : Span ,
23212331
@@ -2449,7 +2459,7 @@ impl<'tcx> UserTypeProjections {
24492459/// * `let (x, _): T = ...` -- here, the `projs` vector would contain
24502460/// `field[0]` (aka `.0`), indicating that the type of `s` is
24512461/// determined by finding the type of the `.0` field from `T`.
2452- #[ derive( Clone , Debug , TyEncodable , TyDecodable , HashStable , PartialEq ) ]
2462+ #[ derive( Clone , Debug , TyEncodable , TyDecodable , Hash , HashStable , PartialEq ) ]
24532463pub struct UserTypeProjection {
24542464 pub base : UserTypeAnnotationIndex ,
24552465 pub projs : Vec < ProjectionKind > ,
0 commit comments