@@ -594,7 +594,7 @@ impl SourceInfo {
594
594
// Borrow kinds
595
595
596
596
#[ derive( Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , TyEncodable , TyDecodable ) ]
597
- #[ derive( HashStable ) ]
597
+ #[ derive( Hash , HashStable ) ]
598
598
pub enum BorrowKind {
599
599
/// Data must be immutable and is aliasable.
600
600
Shared ,
@@ -1163,7 +1163,7 @@ pub struct BasicBlockData<'tcx> {
1163
1163
}
1164
1164
1165
1165
/// Information about an assertion failure.
1166
- #[ derive( Clone , TyEncodable , TyDecodable , HashStable , PartialEq ) ]
1166
+ #[ derive( Clone , TyEncodable , TyDecodable , Hash , HashStable , PartialEq , PartialOrd ) ]
1167
1167
pub enum AssertKind < O > {
1168
1168
BoundsCheck { len : O , index : O } ,
1169
1169
Overflow ( BinOp , O , O ) ,
@@ -1174,7 +1174,17 @@ pub enum AssertKind<O> {
1174
1174
ResumedAfterPanic ( GeneratorKind ) ,
1175
1175
}
1176
1176
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
+ ) ]
1178
1188
pub enum InlineAsmOperand < ' tcx > {
1179
1189
In {
1180
1190
reg : InlineAsmRegOrRegClass ,
@@ -1449,7 +1459,7 @@ impl Statement<'_> {
1449
1459
}
1450
1460
}
1451
1461
1452
- #[ derive( Clone , Debug , PartialEq , TyEncodable , TyDecodable , HashStable , TypeFoldable ) ]
1462
+ #[ derive( Clone , Debug , PartialEq , TyEncodable , TyDecodable , Hash , HashStable , TypeFoldable ) ]
1453
1463
pub enum StatementKind < ' tcx > {
1454
1464
/// Write the RHS Rvalue to the LHS Place.
1455
1465
Assign ( Box < ( Place < ' tcx > , Rvalue < ' tcx > ) > ) ,
@@ -1517,7 +1527,7 @@ impl<'tcx> StatementKind<'tcx> {
1517
1527
}
1518
1528
1519
1529
/// 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 ) ]
1521
1531
pub enum RetagKind {
1522
1532
/// The initial retag when entering a function.
1523
1533
FnEntry ,
@@ -1530,7 +1540,7 @@ pub enum RetagKind {
1530
1540
}
1531
1541
1532
1542
/// 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 ) ]
1534
1544
pub enum FakeReadCause {
1535
1545
/// Inject a fake read of the borrowed input at the end of each guards
1536
1546
/// code.
@@ -1572,7 +1582,7 @@ pub enum FakeReadCause {
1572
1582
ForIndex ,
1573
1583
}
1574
1584
1575
- #[ derive( Clone , Debug , PartialEq , TyEncodable , TyDecodable , HashStable , TypeFoldable ) ]
1585
+ #[ derive( Clone , Debug , PartialEq , TyEncodable , TyDecodable , Hash , HashStable , TypeFoldable ) ]
1576
1586
pub struct LlvmInlineAsm < ' tcx > {
1577
1587
pub asm : hir:: LlvmInlineAsmInner ,
1578
1588
pub outputs : Box < [ Place < ' tcx > ] > ,
@@ -1619,7 +1629,7 @@ impl Debug for Statement<'_> {
1619
1629
}
1620
1630
}
1621
1631
1622
- #[ derive( Clone , Debug , PartialEq , TyEncodable , TyDecodable , HashStable , TypeFoldable ) ]
1632
+ #[ derive( Clone , Debug , PartialEq , TyEncodable , TyDecodable , Hash , HashStable , TypeFoldable ) ]
1623
1633
pub struct Coverage {
1624
1634
pub kind : CoverageKind ,
1625
1635
pub code_region : Option < CodeRegion > ,
@@ -1915,7 +1925,7 @@ pub struct SourceScopeLocalData {
1915
1925
1916
1926
/// These are values that can appear inside an rvalue. They are intentionally
1917
1927
/// 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 ) ]
1919
1929
pub enum Operand < ' tcx > {
1920
1930
/// Copy: The value must be available for use afterwards.
1921
1931
///
@@ -2023,7 +2033,7 @@ impl<'tcx> Operand<'tcx> {
2023
2033
///////////////////////////////////////////////////////////////////////////
2024
2034
/// Rvalues
2025
2035
2026
- #[ derive( Clone , TyEncodable , TyDecodable , HashStable , PartialEq ) ]
2036
+ #[ derive( Clone , TyEncodable , TyDecodable , Hash , HashStable , PartialEq ) ]
2027
2037
pub enum Rvalue < ' tcx > {
2028
2038
/// x (either a move or copy, depending on type of x)
2029
2039
Use ( Operand < ' tcx > ) ,
@@ -2069,13 +2079,13 @@ pub enum Rvalue<'tcx> {
2069
2079
Aggregate ( Box < AggregateKind < ' tcx > > , Vec < Operand < ' tcx > > ) ,
2070
2080
}
2071
2081
2072
- #[ derive( Clone , Copy , Debug , PartialEq , Eq , TyEncodable , TyDecodable , HashStable ) ]
2082
+ #[ derive( Clone , Copy , Debug , PartialEq , Eq , TyEncodable , TyDecodable , Hash , HashStable ) ]
2073
2083
pub enum CastKind {
2074
2084
Misc ,
2075
2085
Pointer ( PointerCast ) ,
2076
2086
}
2077
2087
2078
- #[ derive( Clone , Debug , PartialEq , Eq , TyEncodable , TyDecodable , HashStable ) ]
2088
+ #[ derive( Clone , Debug , PartialEq , Eq , TyEncodable , TyDecodable , Hash , HashStable ) ]
2079
2089
pub enum AggregateKind < ' tcx > {
2080
2090
/// The type is of the element
2081
2091
Array ( Ty < ' tcx > ) ,
@@ -2092,7 +2102,7 @@ pub enum AggregateKind<'tcx> {
2092
2102
Generator ( DefId , SubstsRef < ' tcx > , hir:: Movability ) ,
2093
2103
}
2094
2104
2095
- #[ derive( Copy , Clone , Debug , PartialEq , Eq , TyEncodable , TyDecodable , HashStable ) ]
2105
+ #[ derive( Copy , Clone , Debug , PartialEq , PartialOrd , Eq , TyEncodable , TyDecodable , Hash , HashStable ) ]
2096
2106
pub enum BinOp {
2097
2107
/// The `+` operator (addition)
2098
2108
Add ,
@@ -2137,15 +2147,15 @@ impl BinOp {
2137
2147
}
2138
2148
}
2139
2149
2140
- #[ derive( Copy , Clone , Debug , PartialEq , Eq , TyEncodable , TyDecodable , HashStable ) ]
2150
+ #[ derive( Copy , Clone , Debug , PartialEq , Eq , TyEncodable , TyDecodable , Hash , HashStable ) ]
2141
2151
pub enum NullOp {
2142
2152
/// Returns the size of a value of that type
2143
2153
SizeOf ,
2144
2154
/// Creates a new uninitialized box for a value of that type
2145
2155
Box ,
2146
2156
}
2147
2157
2148
- #[ derive( Copy , Clone , Debug , PartialEq , Eq , TyEncodable , TyDecodable , HashStable ) ]
2158
+ #[ derive( Copy , Clone , Debug , PartialEq , Eq , TyEncodable , TyDecodable , Hash , HashStable ) ]
2149
2159
pub enum UnOp {
2150
2160
/// The `!` operator for logical inversion
2151
2161
Not ,
@@ -2315,7 +2325,7 @@ impl<'tcx> Debug for Rvalue<'tcx> {
2315
2325
/// this does not necessarily mean that they are `==` in Rust. In
2316
2326
/// particular, one must be wary of `NaN`!
2317
2327
2318
- #[ derive( Clone , Copy , PartialEq , TyEncodable , TyDecodable , HashStable ) ]
2328
+ #[ derive( Clone , Copy , PartialEq , PartialOrd , TyEncodable , TyDecodable , Hash , HashStable ) ]
2319
2329
pub struct Constant < ' tcx > {
2320
2330
pub span : Span ,
2321
2331
@@ -2449,7 +2459,7 @@ impl<'tcx> UserTypeProjections {
2449
2459
/// * `let (x, _): T = ...` -- here, the `projs` vector would contain
2450
2460
/// `field[0]` (aka `.0`), indicating that the type of `s` is
2451
2461
/// 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 ) ]
2453
2463
pub struct UserTypeProjection {
2454
2464
pub base : UserTypeAnnotationIndex ,
2455
2465
pub projs : Vec < ProjectionKind > ,
0 commit comments