Rollup merge of #89989 - camelid:type-size, r=jyn514
rustdoc: Add static size assertion for `clean::Type` r? `@jyn514`
This commit is contained in:
commit
874f19f462
1 changed files with 4 additions and 0 deletions
|
@ -1450,6 +1450,10 @@ crate enum Type {
|
|||
ImplTrait(Vec<GenericBound>),
|
||||
}
|
||||
|
||||
// `Type` 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!(Type, 72);
|
||||
|
||||
crate trait GetDefId {
|
||||
/// Use this method to get the [`DefId`] of a [`clean`] AST node.
|
||||
/// This will return [`None`] when called on a primitive [`clean::Type`].
|
||||
|
|
Loading…
Add table
Reference in a new issue