Skip to content

Commit

Permalink
Add static size assertion for clean::GenericParamDef
Browse files Browse the repository at this point in the history
  • Loading branch information
camelid committed Oct 18, 2021
1 parent 8db8f48 commit 9e60288
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/librustdoc/clean/types.rs
Expand Up @@ -1252,6 +1252,10 @@ crate struct GenericParamDef {
crate kind: GenericParamDefKind,
}

// `GenericParamDef` is used in many places. Make sure it doesn't unintentionally get bigger.
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
rustc_data_structures::static_assert_size!(GenericParamDef, 120);

impl GenericParamDef {
crate fn is_synthetic_type_param(&self) -> bool {
match self.kind {
Expand Down

0 comments on commit 9e60288

Please sign in to comment.