From c44c82de2b174d0ca6184d15602ffc33fdbd8ae6 Mon Sep 17 00:00:00 2001 From: Maybe Waffle Date: Thu, 8 Dec 2022 11:20:01 +0000 Subject: Assert size of `rustc_parse_format::Piece<'_>` --- compiler/rustc_parse_format/src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'compiler/rustc_parse_format/src') diff --git a/compiler/rustc_parse_format/src/lib.rs b/compiler/rustc_parse_format/src/lib.rs index 4d01f706272..9cbe04c1288 100644 --- a/compiler/rustc_parse_format/src/lib.rs +++ b/compiler/rustc_parse_format/src/lib.rs @@ -908,5 +908,9 @@ fn find_skips_from_snippet( (skips, true) } +// Assert a reasonable size for `Piece` +#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))] +rustc_data_structures::static_assert_size!(Piece<'_>, 16); + #[cfg(test)] mod tests; -- cgit 1.4.1-3-g733a5