Skip to content

Commit 9e60288

Browse files
committed
Add static size assertion for clean::GenericParamDef
1 parent 8db8f48 commit 9e60288

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
@@ -1252,6 +1252,10 @@ crate struct GenericParamDef {
12521252
crate kind: GenericParamDefKind,
12531253
}
12541254

1255+
// `GenericParamDef` is used in many places. Make sure it doesn't unintentionally get bigger.
1256+
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
1257+
rustc_data_structures::static_assert_size!(GenericParamDef, 120);
1258+
12551259
impl GenericParamDef {
12561260
crate fn is_synthetic_type_param(&self) -> bool {
12571261
match self.kind {

0 commit comments

Comments
 (0)