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;
20
20
use ptr:: P ;
21
21
use rustc_data_structures:: indexed_vec;
22
22
use rustc_data_structures:: indexed_vec:: Idx ;
23
+ use rustc_data_structures:: static_assert;
23
24
use rustc_target:: spec:: abi:: Abi ;
24
25
use source_map:: { dummy_spanned, respan, Spanned } ;
25
26
use symbol:: { keywords, Symbol } ;
@@ -924,6 +925,10 @@ pub struct Expr {
924
925
pub attrs : ThinVec < Attribute > ,
925
926
}
926
927
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
+
927
932
impl Expr {
928
933
/// Whether this expression would be valid somewhere that expects a value, for example, an `if`
929
934
/// condition.
You can’t perform that action at this time.
0 commit comments