@@ -488,7 +488,7 @@ pub struct CopyNonOverlapping<'tcx> {
488
488
/// must also be `cleanup`. This is a part of the type system and checked statically, so it is
489
489
/// still an error to have such an edge in the CFG even if it's known that it won't be taken at
490
490
/// runtime.
491
- #[ derive( Clone , TyEncodable , TyDecodable , Hash , HashStable , PartialEq ) ]
491
+ #[ derive( Clone , TyEncodable , TyDecodable , Hash , HashStable , PartialEq , TypeFoldable , TypeVisitable ) ]
492
492
pub enum TerminatorKind < ' tcx > {
493
493
/// Block has one successor; we continue execution there.
494
494
Goto { target : BasicBlock } ,
@@ -741,7 +741,7 @@ pub enum TerminatorKind<'tcx> {
741
741
}
742
742
743
743
/// Information about an assertion failure.
744
- #[ derive( Clone , TyEncodable , TyDecodable , Hash , HashStable , PartialEq ) ]
744
+ #[ derive( Clone , TyEncodable , TyDecodable , Hash , HashStable , PartialEq , TypeFoldable , TypeVisitable ) ]
745
745
pub enum AssertKind < O > {
746
746
BoundsCheck { len : O , index : O } ,
747
747
Overflow ( BinOp , O , O ) ,
@@ -863,7 +863,7 @@ pub type AssertMessage<'tcx> = AssertKind<Operand<'tcx>>;
863
863
///
864
864
/// Rust currently requires that every place obey those two rules. This is checked by MIRI and taken
865
865
/// advantage of by codegen (via `gep inbounds`). That is possibly subject to change.
866
- #[ derive( Copy , Clone , PartialEq , Eq , Hash , TyEncodable , HashStable ) ]
866
+ #[ derive( Copy , Clone , PartialEq , Eq , Hash , TyEncodable , HashStable , TypeFoldable , TypeVisitable ) ]
867
867
pub struct Place < ' tcx > {
868
868
pub local : Local ,
869
869
@@ -872,7 +872,7 @@ pub struct Place<'tcx> {
872
872
}
873
873
874
874
#[ derive( Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash ) ]
875
- #[ derive( TyEncodable , TyDecodable , HashStable ) ]
875
+ #[ derive( TyEncodable , TyDecodable , HashStable , TypeFoldable , TypeVisitable ) ]
876
876
pub enum ProjectionElem < V , T > {
877
877
Deref ,
878
878
Field ( Field , T ) ,
@@ -955,7 +955,7 @@ pub type PlaceElem<'tcx> = ProjectionElem<Local, Ty<'tcx>>;
955
955
/// **Needs clarifiation:** Is loading a place that has its variant index set well-formed? Miri
956
956
/// currently implements it, but it seems like this may be something to check against in the
957
957
/// validator.
958
- #[ derive( Clone , PartialEq , TyEncodable , TyDecodable , Hash , HashStable ) ]
958
+ #[ derive( Clone , PartialEq , TyEncodable , TyDecodable , Hash , HashStable , TypeFoldable , TypeVisitable ) ]
959
959
pub enum Operand < ' tcx > {
960
960
/// Creates a value by loading the given place.
961
961
///
@@ -986,7 +986,7 @@ pub enum Operand<'tcx> {
986
986
/// Computing any rvalue begins by evaluating the places and operands in some order (**Needs
987
987
/// clarification**: Which order?). These are then used to produce a "value" - the same kind of
988
988
/// value that an [`Operand`] produces.
989
- #[ derive( Clone , TyEncodable , TyDecodable , Hash , HashStable , PartialEq ) ]
989
+ #[ derive( Clone , TyEncodable , TyDecodable , Hash , HashStable , PartialEq , TypeFoldable , TypeVisitable ) ]
990
990
pub enum Rvalue < ' tcx > {
991
991
/// Yields the operand unchanged
992
992
Use ( Operand < ' tcx > ) ,
@@ -1146,6 +1146,7 @@ pub enum CastKind {
1146
1146
}
1147
1147
1148
1148
#[ derive( Clone , Debug , PartialEq , Eq , TyEncodable , TyDecodable , Hash , HashStable ) ]
1149
+ #[ derive( TypeFoldable , TypeVisitable ) ]
1149
1150
pub enum AggregateKind < ' tcx > {
1150
1151
/// The type is of the element
1151
1152
Array ( Ty < ' tcx > ) ,
0 commit comments