File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ use print::pprust;
2020use ptr:: P ;
2121use rustc_data_structures:: indexed_vec;
2222use rustc_data_structures:: indexed_vec:: Idx ;
23+ use rustc_data_structures:: static_assert;
2324use rustc_target:: spec:: abi:: Abi ;
2425use source_map:: { dummy_spanned, respan, Spanned } ;
2526use symbol:: { keywords, Symbol } ;
@@ -924,6 +925,10 @@ pub struct Expr {
924925 pub attrs : ThinVec < Attribute > ,
925926}
926927
928+ // `Expr` is used a lot. Make sure it doesn't unintentionally get bigger.
929+ #[ cfg( target_arch = "x86_64" ) ]
930+ static_assert ! ( MEM_SIZE_OF_EXPR : std:: mem:: size_of:: <Expr >( ) == 88 ) ;
931+
927932impl Expr {
928933 /// Whether this expression would be valid somewhere that expects a value, for example, an `if`
929934 /// condition.
You can’t perform that action at this time.
0 commit comments