Skip to content

Commit 874f19f

Browse files
authored
Rollup merge of #89989 - camelid:type-size, r=jyn514
rustdoc: Add static size assertion for `clean::Type` r? `@jyn514`
2 parents cd72393 + 10b9b3d commit 874f19f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/librustdoc/clean/types.rs

+4
Original file line numberDiff line numberDiff line change
@@ -1450,6 +1450,10 @@ crate enum Type {
14501450
ImplTrait(Vec<GenericBound>),
14511451
}
14521452

1453+
// `Type` is used a lot. Make sure it doesn't unintentionally get bigger.
1454+
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
1455+
rustc_data_structures::static_assert_size!(Type, 72);
1456+
14531457
crate trait GetDefId {
14541458
/// Use this method to get the [`DefId`] of a [`clean`] AST node.
14551459
/// This will return [`None`] when called on a primitive [`clean::Type`].

0 commit comments

Comments
 (0)