diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2022-04-20 09:31:34 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2022-04-20 11:48:07 +1000 |
| commit | 804103b0aedf38cbc1a0c0dbf37a627eb48b8902 (patch) | |
| tree | 029634a4ce4ea88746a7499edbf458f85e77891e /compiler/rustc_parse/src | |
| parent | f1c32c10c476c5a77c662ce70cb04639cda3eb4b (diff) | |
| download | rust-804103b0aedf38cbc1a0c0dbf37a627eb48b8902.tar.gz rust-804103b0aedf38cbc1a0c0dbf37a627eb48b8902.zip | |
Add a size assertion for `Parser`.
Diffstat (limited to 'compiler/rustc_parse/src')
| -rw-r--r-- | compiler/rustc_parse/src/parser/mod.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_parse/src/parser/mod.rs b/compiler/rustc_parse/src/parser/mod.rs index 925d6ac405b..67bfb98ccd3 100644 --- a/compiler/rustc_parse/src/parser/mod.rs +++ b/compiler/rustc_parse/src/parser/mod.rs @@ -150,6 +150,11 @@ pub struct Parser<'a> { pub current_closure: Option<ClosureSpans>, } +// This type is used a lot, e.g. it's cloned when matching many declarative macro rules. Make sure +// it doesn't unintentionally get bigger. +#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))] +rustc_data_structures::static_assert_size!(Parser<'_>, 328); + /// Stores span information about a closure. #[derive(Clone)] pub struct ClosureSpans { |
