@@ -1683,6 +1683,9 @@ pub struct Place<'tcx> {
16831683 pub projection : & ' tcx List < PlaceElem < ' tcx > > ,
16841684}
16851685
1686+ #[ cfg( target_arch = "x86_64" ) ]
1687+ static_assert_size ! ( Place <' _>, 16 ) ;
1688+
16861689#[ derive( Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash ) ]
16871690#[ derive( TyEncodable , TyDecodable , HashStable ) ]
16881691pub enum ProjectionElem < V , T > {
@@ -1981,6 +1984,9 @@ pub enum Operand<'tcx> {
19811984 Constant ( Box < Constant < ' tcx > > ) ,
19821985}
19831986
1987+ #[ cfg( target_arch = "x86_64" ) ]
1988+ static_assert_size ! ( Operand <' _>, 24 ) ;
1989+
19841990impl < ' tcx > Debug for Operand < ' tcx > {
19851991 fn fmt ( & self , fmt : & mut Formatter < ' _ > ) -> fmt:: Result {
19861992 use self :: Operand :: * ;
@@ -2096,8 +2102,8 @@ pub enum Rvalue<'tcx> {
20962102
20972103 Cast ( CastKind , Operand < ' tcx > , Ty < ' tcx > ) ,
20982104
2099- BinaryOp ( BinOp , Operand < ' tcx > , Operand < ' tcx > ) ,
2100- CheckedBinaryOp ( BinOp , Operand < ' tcx > , Operand < ' tcx > ) ,
2105+ BinaryOp ( BinOp , Box < ( Operand < ' tcx > , Operand < ' tcx > ) > ) ,
2106+ CheckedBinaryOp ( BinOp , Box < ( Operand < ' tcx > , Operand < ' tcx > ) > ) ,
21012107
21022108 NullaryOp ( NullOp , Ty < ' tcx > ) ,
21032109 UnaryOp ( UnOp , Operand < ' tcx > ) ,
@@ -2116,6 +2122,9 @@ pub enum Rvalue<'tcx> {
21162122 Aggregate ( Box < AggregateKind < ' tcx > > , Vec < Operand < ' tcx > > ) ,
21172123}
21182124
2125+ #[ cfg( target_arch = "x86_64" ) ]
2126+ static_assert_size ! ( Rvalue <' _>, 40 ) ;
2127+
21192128#[ derive( Clone , Copy , Debug , PartialEq , Eq , TyEncodable , TyDecodable , Hash , HashStable ) ]
21202129pub enum CastKind {
21212130 Misc ,
@@ -2139,6 +2148,9 @@ pub enum AggregateKind<'tcx> {
21392148 Generator ( DefId , SubstsRef < ' tcx > , hir:: Movability ) ,
21402149}
21412150
2151+ #[ cfg( target_arch = "x86_64" ) ]
2152+ static_assert_size ! ( AggregateKind <' _>, 48 ) ;
2153+
21422154#[ derive( Copy , Clone , Debug , PartialEq , PartialOrd , Eq , TyEncodable , TyDecodable , Hash , HashStable ) ]
21432155pub enum BinOp {
21442156 /// The `+` operator (addition)
@@ -2215,8 +2227,8 @@ impl<'tcx> Debug for Rvalue<'tcx> {
22152227 Cast ( ref kind, ref place, ref ty) => {
22162228 write ! ( fmt, "{:?} as {:?} ({:?})" , place, ty, kind)
22172229 }
2218- BinaryOp ( ref op, ref a, ref b) => write ! ( fmt, "{:?}({:?}, {:?})" , op, a, b) ,
2219- CheckedBinaryOp ( ref op, ref a, ref b) => {
2230+ BinaryOp ( ref op, box ( ref a, ref b) ) => write ! ( fmt, "{:?}({:?}, {:?})" , op, a, b) ,
2231+ CheckedBinaryOp ( ref op, box ( ref a, ref b) ) => {
22202232 write ! ( fmt, "Checked{:?}({:?}, {:?})" , op, a, b)
22212233 }
22222234 UnaryOp ( ref op, ref a) => write ! ( fmt, "{:?}({:?})" , op, a) ,
0 commit comments