Skip to content

Commit

Permalink
Move size assertions for mir::syntax types into the same module
Browse files Browse the repository at this point in the history
A redundant size assertion for `StatementKind` was added in rust-lang#122937, because
the existing assertion was in a different module.

This patch cleans that up, and also moves the `TerminatorKind` assertion into
the same module where it belongs, to avoid the same thing happening again.
  • Loading branch information
Zalathar committed Apr 16, 2024
1 parent 63f70b3 commit 71df270
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 0 additions & 2 deletions compiler/rustc_middle/src/mir/mod.rs
Expand Up @@ -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
}
1 change: 1 addition & 0 deletions compiler/rustc_middle/src/mir/syntax.rs
Expand Up @@ -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
}

0 comments on commit 71df270

Please sign in to comment.