Skip to content

Commit

Permalink
Rollup merge of #110750 - scottmcm:vardebug-size, r=cjgillot
Browse files Browse the repository at this point in the history
Add size asserts for MIR `SourceScopeData` & `VarDebugInfo`

There's vectors of both of these in `mir::Body`, so might as well track them.

(I was pondering adding something to one or the other, so wanted this to see the memory impact.)
  • Loading branch information
JohnTitor authored Apr 24, 2023
2 parents b708aad + 31531ce commit 16fdef7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions compiler/rustc_middle/src/mir/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3096,9 +3096,11 @@ mod size_asserts {
// tidy-alphabetical-start
static_assert_size!(BasicBlockData<'_>, 144);
static_assert_size!(LocalDecl<'_>, 40);
static_assert_size!(SourceScopeData<'_>, 72);
static_assert_size!(Statement<'_>, 32);
static_assert_size!(StatementKind<'_>, 16);
static_assert_size!(Terminator<'_>, 112);
static_assert_size!(TerminatorKind<'_>, 96);
static_assert_size!(VarDebugInfo<'_>, 80);
// tidy-alphabetical-end
}

0 comments on commit 16fdef7

Please sign in to comment.