@@ -488,7 +488,7 @@ pub struct CopyNonOverlapping<'tcx> {
488488/// must also be `cleanup`. This is a part of the type system and checked statically, so it is
489489/// still an error to have such an edge in the CFG even if it's known that it won't be taken at
490490/// runtime.
491- #[ derive( Clone , TyEncodable , TyDecodable , Hash , HashStable , PartialEq ) ]
491+ #[ derive( Clone , TyEncodable , TyDecodable , Hash , HashStable , PartialEq , TypeFoldable , TypeVisitable ) ]
492492pub enum TerminatorKind < ' tcx > {
493493 /// Block has one successor; we continue execution there.
494494 Goto { target : BasicBlock } ,
@@ -741,7 +741,7 @@ pub enum TerminatorKind<'tcx> {
741741}
742742
743743/// Information about an assertion failure.
744- #[ derive( Clone , TyEncodable , TyDecodable , Hash , HashStable , PartialEq ) ]
744+ #[ derive( Clone , TyEncodable , TyDecodable , Hash , HashStable , PartialEq , TypeFoldable , TypeVisitable ) ]
745745pub enum AssertKind < O > {
746746 BoundsCheck { len : O , index : O } ,
747747 Overflow ( BinOp , O , O ) ,
@@ -863,7 +863,7 @@ pub type AssertMessage<'tcx> = AssertKind<Operand<'tcx>>;
863863///
864864/// Rust currently requires that every place obey those two rules. This is checked by MIRI and taken
865865/// 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 ) ]
867867pub struct Place < ' tcx > {
868868 pub local : Local ,
869869
@@ -872,7 +872,7 @@ pub struct Place<'tcx> {
872872}
873873
874874#[ derive( Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash ) ]
875- #[ derive( TyEncodable , TyDecodable , HashStable ) ]
875+ #[ derive( TyEncodable , TyDecodable , HashStable , TypeFoldable , TypeVisitable ) ]
876876pub enum ProjectionElem < V , T > {
877877 Deref ,
878878 Field ( Field , T ) ,
@@ -955,7 +955,7 @@ pub type PlaceElem<'tcx> = ProjectionElem<Local, Ty<'tcx>>;
955955/// **Needs clarifiation:** Is loading a place that has its variant index set well-formed? Miri
956956/// currently implements it, but it seems like this may be something to check against in the
957957/// validator.
958- #[ derive( Clone , PartialEq , TyEncodable , TyDecodable , Hash , HashStable ) ]
958+ #[ derive( Clone , PartialEq , TyEncodable , TyDecodable , Hash , HashStable , TypeFoldable , TypeVisitable ) ]
959959pub enum Operand < ' tcx > {
960960 /// Creates a value by loading the given place.
961961 ///
@@ -986,7 +986,7 @@ pub enum Operand<'tcx> {
986986/// Computing any rvalue begins by evaluating the places and operands in some order (**Needs
987987/// clarification**: Which order?). These are then used to produce a "value" - the same kind of
988988/// value that an [`Operand`] produces.
989- #[ derive( Clone , TyEncodable , TyDecodable , Hash , HashStable , PartialEq ) ]
989+ #[ derive( Clone , TyEncodable , TyDecodable , Hash , HashStable , PartialEq , TypeFoldable , TypeVisitable ) ]
990990pub enum Rvalue < ' tcx > {
991991 /// Yields the operand unchanged
992992 Use ( Operand < ' tcx > ) ,
@@ -1146,6 +1146,7 @@ pub enum CastKind {
11461146}
11471147
11481148#[ derive( Clone , Debug , PartialEq , Eq , TyEncodable , TyDecodable , Hash , HashStable ) ]
1149+ #[ derive( TypeFoldable , TypeVisitable ) ]
11491150pub enum AggregateKind < ' tcx > {
11501151 /// The type is of the element
11511152 Array ( Ty < ' tcx > ) ,
0 commit comments