@@ -1547,7 +1547,7 @@ pub struct Statement<'tcx> {
15471547
15481548// `Statement` is used a lot. Make sure it doesn't unintentionally get bigger.
15491549#[ cfg( target_arch = "x86_64" ) ]
1550- static_assert_size ! ( Statement <' _>, 64 ) ;
1550+ static_assert_size ! ( Statement <' _>, 32 ) ;
15511551
15521552impl Statement < ' _ > {
15531553 /// Changes a statement to a nop. This is both faster than deleting instructions and avoids
@@ -1568,7 +1568,7 @@ impl Statement<'_> {
15681568#[ derive( Clone , Debug , RustcEncodable , RustcDecodable , HashStable ) ]
15691569pub enum StatementKind < ' tcx > {
15701570 /// Write the RHS Rvalue to the LHS Place.
1571- Assign ( Place < ' tcx > , Box < Rvalue < ' tcx > > ) ,
1571+ Assign ( Box < ( Place < ' tcx > , Rvalue < ' tcx > ) > ) ,
15721572
15731573 /// This represents all the reading that a pattern match may do
15741574 /// (e.g., inspecting constants and discriminant values), and the
@@ -1577,10 +1577,10 @@ pub enum StatementKind<'tcx> {
15771577 ///
15781578 /// Note that this also is emitted for regular `let` bindings to ensure that locals that are
15791579 /// never accessed still get some sanity checks for, e.g., `let x: ! = ..;`
1580- FakeRead ( FakeReadCause , Place < ' tcx > ) ,
1580+ FakeRead ( FakeReadCause , Box < Place < ' tcx > > ) ,
15811581
15821582 /// Write the discriminant for a variant to the enum Place.
1583- SetDiscriminant { place : Place < ' tcx > , variant_index : VariantIdx } ,
1583+ SetDiscriminant { place : Box < Place < ' tcx > > , variant_index : VariantIdx } ,
15841584
15851585 /// Start a live range for the storage of the local.
15861586 StorageLive ( Local ) ,
@@ -1597,7 +1597,7 @@ pub enum StatementKind<'tcx> {
15971597 /// by miri and only generated when "-Z mir-emit-retag" is passed.
15981598 /// See <https://internals.rust-lang.org/t/stacked-borrows-an-aliasing-model-for-rust/8153/>
15991599 /// for more details.
1600- Retag ( RetagKind , Place < ' tcx > ) ,
1600+ Retag ( RetagKind , Box < Place < ' tcx > > ) ,
16011601
16021602 /// Encodes a user's type ascription. These need to be preserved
16031603 /// intact so that NLL can respect them. For example:
@@ -1611,7 +1611,7 @@ pub enum StatementKind<'tcx> {
16111611 /// - `Contravariant` -- requires that `T_y :> T`
16121612 /// - `Invariant` -- requires that `T_y == T`
16131613 /// - `Bivariant` -- no effect
1614- AscribeUserType ( Place < ' tcx > , ty:: Variance , Box < UserTypeProjection > ) ,
1614+ AscribeUserType ( Box < ( Place < ' tcx > , UserTypeProjection ) > , ty:: Variance ) ,
16151615
16161616 /// No-op. Useful for deleting instructions without affecting statement indices.
16171617 Nop ,
@@ -1675,7 +1675,7 @@ impl Debug for Statement<'_> {
16751675 fn fmt ( & self , fmt : & mut Formatter < ' _ > ) -> fmt:: Result {
16761676 use self :: StatementKind :: * ;
16771677 match self . kind {
1678- Assign ( ref place, ref rv) => write ! ( fmt, "{:?} = {:?}" , place, rv) ,
1678+ Assign ( box ( ref place, ref rv) ) => write ! ( fmt, "{:?} = {:?}" , place, rv) ,
16791679 FakeRead ( ref cause, ref place) => write ! ( fmt, "FakeRead({:?}, {:?})" , cause, place) ,
16801680 Retag ( ref kind, ref place) => write ! (
16811681 fmt,
@@ -1696,7 +1696,7 @@ impl Debug for Statement<'_> {
16961696 InlineAsm ( ref asm) => {
16971697 write ! ( fmt, "asm!({:?} : {:?} : {:?})" , asm. asm, asm. outputs, asm. inputs)
16981698 }
1699- AscribeUserType ( ref place, ref variance , ref c_ty ) => {
1699+ AscribeUserType ( box ( ref place, ref c_ty ) , ref variance ) => {
17001700 write ! ( fmt, "AscribeUserType({:?}, {:?}, {:?})" , place, variance, c_ty)
17011701 }
17021702 Nop => write ! ( fmt, "nop" ) ,
@@ -2998,14 +2998,14 @@ BraceStructTypeFoldableImpl! {
29982998
29992999EnumTypeFoldableImpl ! {
30003000 impl <' tcx> TypeFoldable <' tcx> for StatementKind <' tcx> {
3001- ( StatementKind :: Assign ) ( a, b ) ,
3001+ ( StatementKind :: Assign ) ( a) ,
30023002 ( StatementKind :: FakeRead ) ( cause, place) ,
30033003 ( StatementKind :: SetDiscriminant ) { place, variant_index } ,
30043004 ( StatementKind :: StorageLive ) ( a) ,
30053005 ( StatementKind :: StorageDead ) ( a) ,
30063006 ( StatementKind :: InlineAsm ) ( a) ,
30073007 ( StatementKind :: Retag ) ( kind, place) ,
3008- ( StatementKind :: AscribeUserType ) ( a, v, b ) ,
3008+ ( StatementKind :: AscribeUserType ) ( a, v) ,
30093009 ( StatementKind :: Nop ) ,
30103010 }
30113011}
0 commit comments