@@ -1547,7 +1547,7 @@ pub struct Statement<'tcx> {
1547
1547
1548
1548
// `Statement` is used a lot. Make sure it doesn't unintentionally get bigger.
1549
1549
#[ cfg( target_arch = "x86_64" ) ]
1550
- static_assert_size ! ( Statement <' _>, 64 ) ;
1550
+ static_assert_size ! ( Statement <' _>, 32 ) ;
1551
1551
1552
1552
impl Statement < ' _ > {
1553
1553
/// Changes a statement to a nop. This is both faster than deleting instructions and avoids
@@ -1568,7 +1568,7 @@ impl Statement<'_> {
1568
1568
#[ derive( Clone , Debug , RustcEncodable , RustcDecodable , HashStable ) ]
1569
1569
pub enum StatementKind < ' tcx > {
1570
1570
/// Write the RHS Rvalue to the LHS Place.
1571
- Assign ( Place < ' tcx > , Box < Rvalue < ' tcx > > ) ,
1571
+ Assign ( Box < ( Place < ' tcx > , Rvalue < ' tcx > ) > ) ,
1572
1572
1573
1573
/// This represents all the reading that a pattern match may do
1574
1574
/// (e.g., inspecting constants and discriminant values), and the
@@ -1577,10 +1577,10 @@ pub enum StatementKind<'tcx> {
1577
1577
///
1578
1578
/// Note that this also is emitted for regular `let` bindings to ensure that locals that are
1579
1579
/// never accessed still get some sanity checks for, e.g., `let x: ! = ..;`
1580
- FakeRead ( FakeReadCause , Place < ' tcx > ) ,
1580
+ FakeRead ( FakeReadCause , Box < Place < ' tcx > > ) ,
1581
1581
1582
1582
/// 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 } ,
1584
1584
1585
1585
/// Start a live range for the storage of the local.
1586
1586
StorageLive ( Local ) ,
@@ -1597,7 +1597,7 @@ pub enum StatementKind<'tcx> {
1597
1597
/// by miri and only generated when "-Z mir-emit-retag" is passed.
1598
1598
/// See <https://internals.rust-lang.org/t/stacked-borrows-an-aliasing-model-for-rust/8153/>
1599
1599
/// for more details.
1600
- Retag ( RetagKind , Place < ' tcx > ) ,
1600
+ Retag ( RetagKind , Box < Place < ' tcx > > ) ,
1601
1601
1602
1602
/// Encodes a user's type ascription. These need to be preserved
1603
1603
/// intact so that NLL can respect them. For example:
@@ -1611,7 +1611,7 @@ pub enum StatementKind<'tcx> {
1611
1611
/// - `Contravariant` -- requires that `T_y :> T`
1612
1612
/// - `Invariant` -- requires that `T_y == T`
1613
1613
/// - `Bivariant` -- no effect
1614
- AscribeUserType ( Place < ' tcx > , ty:: Variance , Box < UserTypeProjection > ) ,
1614
+ AscribeUserType ( Box < ( Place < ' tcx > , UserTypeProjection ) > , ty:: Variance ) ,
1615
1615
1616
1616
/// No-op. Useful for deleting instructions without affecting statement indices.
1617
1617
Nop ,
@@ -1675,7 +1675,7 @@ impl Debug for Statement<'_> {
1675
1675
fn fmt ( & self , fmt : & mut Formatter < ' _ > ) -> fmt:: Result {
1676
1676
use self :: StatementKind :: * ;
1677
1677
match self . kind {
1678
- Assign ( ref place, ref rv) => write ! ( fmt, "{:?} = {:?}" , place, rv) ,
1678
+ Assign ( box ( ref place, ref rv) ) => write ! ( fmt, "{:?} = {:?}" , place, rv) ,
1679
1679
FakeRead ( ref cause, ref place) => write ! ( fmt, "FakeRead({:?}, {:?})" , cause, place) ,
1680
1680
Retag ( ref kind, ref place) => write ! (
1681
1681
fmt,
@@ -1696,7 +1696,7 @@ impl Debug for Statement<'_> {
1696
1696
InlineAsm ( ref asm) => {
1697
1697
write ! ( fmt, "asm!({:?} : {:?} : {:?})" , asm. asm, asm. outputs, asm. inputs)
1698
1698
}
1699
- AscribeUserType ( ref place, ref variance , ref c_ty ) => {
1699
+ AscribeUserType ( box ( ref place, ref c_ty ) , ref variance ) => {
1700
1700
write ! ( fmt, "AscribeUserType({:?}, {:?}, {:?})" , place, variance, c_ty)
1701
1701
}
1702
1702
Nop => write ! ( fmt, "nop" ) ,
@@ -2998,14 +2998,14 @@ BraceStructTypeFoldableImpl! {
2998
2998
2999
2999
EnumTypeFoldableImpl ! {
3000
3000
impl <' tcx> TypeFoldable <' tcx> for StatementKind <' tcx> {
3001
- ( StatementKind :: Assign ) ( a, b ) ,
3001
+ ( StatementKind :: Assign ) ( a) ,
3002
3002
( StatementKind :: FakeRead ) ( cause, place) ,
3003
3003
( StatementKind :: SetDiscriminant ) { place, variant_index } ,
3004
3004
( StatementKind :: StorageLive ) ( a) ,
3005
3005
( StatementKind :: StorageDead ) ( a) ,
3006
3006
( StatementKind :: InlineAsm ) ( a) ,
3007
3007
( StatementKind :: Retag ) ( kind, place) ,
3008
- ( StatementKind :: AscribeUserType ) ( a, v, b ) ,
3008
+ ( StatementKind :: AscribeUserType ) ( a, v) ,
3009
3009
( StatementKind :: Nop ) ,
3010
3010
}
3011
3011
}
0 commit comments