about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2024-04-16 15:19:16 +0200
committerGitHub <noreply@github.com>2024-04-16 15:19:16 +0200
commitdd083470e1507091efa89e4735eb1f869f1667e0 (patch)
treeaa6ec46e6995db090ce3e4fb1033b69329c38a2b
parent583c1a09eebe3544db2b69fd410b048b47260ef7 (diff)
parentc0e7659cae9413210148b60278d5c9c2571308b7 (diff)
Rollup merge of #124006 - Zalathar:static-assert, r=nnethercote
Move size assertions for `mir::syntax` types into the same file

A redundant size assertion for `StatementKind` was added in #122937, because the existing assertion was in a different file.

This PR cleans that up, and also moves the `TerminatorKind` assertion into the same file where it belongs, to avoid the same thing happening again.

r? `@nnethercote`
-rw-r--r--compiler/rustc_middle/src/mir/mod.rs2
-rw-r--r--compiler/rustc_middle/src/mir/syntax.rs1
2 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_middle/src/mir/mod.rs b/compiler/rustc_middle/src/mir/mod.rs
index 601bfc770f4..ff5afbbe5d0 100644
--- a/compiler/rustc_middle/src/mir/mod.rs
+++ b/compiler/rustc_middle/src/mir/mod.rs
@@ -1823,9 +1823,7 @@ mod size_asserts {
     static_assert_size!(LocalDecl<'_>, 40);
     static_assert_size!(SourceScopeData<'_>, 64);
     static_assert_size!(Statement<'_>, 32);
-    static_assert_size!(StatementKind<'_>, 16);
     static_assert_size!(Terminator<'_>, 112);
-    static_assert_size!(TerminatorKind<'_>, 96);
     static_assert_size!(VarDebugInfo<'_>, 88);
     // tidy-alphabetical-end
 }
diff --git a/compiler/rustc_middle/src/mir/syntax.rs b/compiler/rustc_middle/src/mir/syntax.rs
index c78c225b0cd..9b409574026 100644
--- a/compiler/rustc_middle/src/mir/syntax.rs
+++ b/compiler/rustc_middle/src/mir/syntax.rs
@@ -1463,5 +1463,6 @@ mod size_asserts {
     static_assert_size!(PlaceElem<'_>, 24);
     static_assert_size!(Rvalue<'_>, 40);
     static_assert_size!(StatementKind<'_>, 16);
+    static_assert_size!(TerminatorKind<'_>, 96);
     // tidy-alphabetical-end
 }