Skip to content

Commit cda1627

Browse files
committed
Add a size assertion for LocalDecl.
1 parent afd8a4e commit cda1627

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/librustc_middle/mir/mod.rs

+4
Original file line numberDiff line numberDiff line change
@@ -816,6 +816,10 @@ pub struct LocalDecl<'tcx> {
816816
pub source_info: SourceInfo,
817817
}
818818

819+
// `LocalDecl` is used a lot. Make sure it doesn't unintentionally get bigger.
820+
#[cfg(target_arch = "x86_64")]
821+
static_assert_size!(LocalDecl<'_>, 128);
822+
819823
/// Extra information about a local that's used for diagnostics.
820824
#[derive(Clone, Debug, RustcEncodable, RustcDecodable, HashStable, TypeFoldable)]
821825
pub enum LocalInfo<'tcx> {

0 commit comments

Comments
 (0)