From 9f16f1f6f637d729c92789cae26a1adb7eee40cd Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Sun, 7 Jul 2024 16:25:22 +1000 Subject: [PATCH] Add an size assertion. `Option` is the type that's actually used in all the aST nodes. --- compiler/rustc_ast/src/tokenstream.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/compiler/rustc_ast/src/tokenstream.rs b/compiler/rustc_ast/src/tokenstream.rs index f3b6dc2cfa1..ee068f19332 100644 --- a/compiler/rustc_ast/src/tokenstream.rs +++ b/compiler/rustc_ast/src/tokenstream.rs @@ -765,6 +765,7 @@ mod size_asserts { static_assert_size!(AttrTokenStream, 8); static_assert_size!(AttrTokenTree, 32); static_assert_size!(LazyAttrTokenStream, 8); + static_assert_size!(Option, 8); // must be small, used in many AST nodes static_assert_size!(TokenStream, 8); static_assert_size!(TokenTree, 32); // tidy-alphabetical-end