Skip to content

Commit 5fce0dd

Browse files
committed
Add static assertion for the size of ItemKind
1 parent 4a44263 commit 5fce0dd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/librustdoc/clean/types.rs

+4
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ crate struct Item {
8888
crate def_id: DefId,
8989
}
9090

91+
// `Item` is used a lot. Make sure it doesn't unintentionally get bigger.
92+
#[cfg(target_arch = "x86_64")]
93+
rustc_data_structures::static_assert_size!(Item, 136);
94+
9195
impl fmt::Debug for Item {
9296
fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
9397
let def_id: &dyn fmt::Debug = if self.is_fake() { &"**FAKE**" } else { &self.def_id };

0 commit comments

Comments
 (0)