File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1719,14 +1719,14 @@ pub struct Statement<'tcx> {
17191719 pub kind : StatementKind < ' tcx > ,
17201720}
17211721
1722+ // `Statement` is used a lot. Make sure it doesn't unintentionally get bigger.
1723+ #[ cfg( target_arch = "x86_64" ) ]
1724+ static_assert ! ( MEM_SIZE_OF_STATEMENT : mem:: size_of:: <Statement <' _>>( ) == 56 ) ;
1725+
17221726impl < ' tcx > Statement < ' tcx > {
17231727 /// Changes a statement to a nop. This is both faster than deleting instructions and avoids
17241728 /// invalidating statement indices in `Location`s.
17251729 pub fn make_nop ( & mut self ) {
1726- // `Statement` contributes significantly to peak memory usage. Make
1727- // sure it doesn't get bigger.
1728- static_assert ! ( STATEMENT_IS_AT_MOST_56_BYTES : mem:: size_of:: <Statement <' _>>( ) <= 56 ) ;
1729-
17301730 self . kind = StatementKind :: Nop
17311731 }
17321732
You can’t perform that action at this time.
0 commit comments