Assert size of rustc_parse_format::Piece<'_>

This commit is contained in:
Maybe Waffle 2022-12-08 11:20:01 +00:00
parent 78060cb6de
commit c44c82de2b
3 changed files with 6 additions and 0 deletions

View File

@ -4148,6 +4148,7 @@ dependencies = [
name = "rustc_parse_format" name = "rustc_parse_format"
version = "0.0.0" version = "0.0.0"
dependencies = [ dependencies = [
"rustc_data_structures",
"rustc_lexer", "rustc_lexer",
] ]

View File

@ -5,3 +5,4 @@ edition = "2021"
[dependencies] [dependencies]
rustc_lexer = { path = "../rustc_lexer" } rustc_lexer = { path = "../rustc_lexer" }
rustc_data_structures = { path = "../rustc_data_structures" }

View File

@ -908,5 +908,9 @@ fn find_skips_from_snippet(
(skips, true) (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)] #[cfg(test)]
mod tests; mod tests;