Skip to content

Commit 27d47d9

Browse files
committed
rustdoc: Add static size assertion for clean::Crate
1 parent e99963c commit 27d47d9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/librustdoc/clean/types.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,10 @@ crate struct Crate {
125125
crate collapsed: bool,
126126
}
127127

128+
// `Crate` is frequently moved by-value. Make sure it doesn't unintentionally get bigger.
129+
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
130+
rustc_data_structures::static_assert_size!(Crate, 168);
131+
128132
/// This struct is used to wrap additional information added by rustdoc on a `trait` item.
129133
#[derive(Clone, Debug)]
130134
crate struct TraitWithExtraInfo {

0 commit comments

Comments
 (0)