about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2024-07-07 16:25:22 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2024-07-07 16:25:22 +1000
commit9f16f1f6f637d729c92789cae26a1adb7eee40cd (patch)
treeb28e85d8736f2deff7ba169581bef29649f0c82a
parent022582ca46d9bedecf0b434b6a4130c9a2a4657d (diff)
downloadrust-9f16f1f6f637d729c92789cae26a1adb7eee40cd.tar.gz
rust-9f16f1f6f637d729c92789cae26a1adb7eee40cd.zip
Add an size assertion.
`Option<LazyAttrTokenStream>` is the type that's actually used in all
the aST nodes.
-rw-r--r--compiler/rustc_ast/src/tokenstream.rs1
1 files changed, 1 insertions, 0 deletions
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<LazyAttrTokenStream>, 8); // must be small, used in many AST nodes
     static_assert_size!(TokenStream, 8);
     static_assert_size!(TokenTree, 32);
     // tidy-alphabetical-end