Rollup merge of #89989 - camelid:type-size, r=jyn514

rustdoc: Add static size assertion for `clean::Type`

r? `@jyn514`
This commit is contained in:
Matthias Krüger 2021-10-18 08:13:29 +02:00 committed by GitHub
commit 874f19f462
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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`].