rustdoc: Add static size assertion for DocFragment
Tons of them are constructed, so the size has a big impact on max-rss.
This commit is contained in:
parent
a77da2d454
commit
8b8f1e069f
1 changed files with 4 additions and 0 deletions
|
|
@ -918,6 +918,10 @@ crate struct DocFragment {
|
|||
crate indent: usize,
|
||||
}
|
||||
|
||||
// `DocFragment` is used a lot. Make sure it doesn't unintentionally get bigger.
|
||||
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
|
||||
rustc_data_structures::static_assert_size!(DocFragment, 32);
|
||||
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Debug, Hash)]
|
||||
crate enum DocFragmentKind {
|
||||
/// A doc fragment created from a `///` or `//!` doc comment.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue