Add static size assertion for clean::Type

This commit is contained in:
Noah Lev 2021-10-17 13:20:43 -07:00
parent 8db8f48ea8
commit 10b9b3d383

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