diff options
| author | Joshua Nelson <jyn514@gmail.com> | 2020-12-29 00:31:46 -0500 |
|---|---|---|
| committer | Joshua Nelson <jyn514@gmail.com> | 2020-12-29 00:43:25 -0500 |
| commit | 5fce0dd787f319d229ecbd679781655549a418f2 (patch) | |
| tree | 975b32dd03c22d777a918470b93749d628738c45 | |
| parent | 4a4426377e8f1ad61dd6d4bb3525bbf2997889b9 (diff) | |
| download | rust-5fce0dd787f319d229ecbd679781655549a418f2.tar.gz rust-5fce0dd787f319d229ecbd679781655549a418f2.zip | |
Add static assertion for the size of ItemKind
| -rw-r--r-- | src/librustdoc/clean/types.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/librustdoc/clean/types.rs b/src/librustdoc/clean/types.rs index fc977704e44..845efe056b3 100644 --- a/src/librustdoc/clean/types.rs +++ b/src/librustdoc/clean/types.rs @@ -88,6 +88,10 @@ crate struct Item { crate def_id: DefId, } +// `Item` is used a lot. Make sure it doesn't unintentionally get bigger. +#[cfg(target_arch = "x86_64")] +rustc_data_structures::static_assert_size!(Item, 136); + impl fmt::Debug for Item { fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result { let def_id: &dyn fmt::Debug = if self.is_fake() { &"**FAKE**" } else { &self.def_id }; |
