]> git.lizzy.rs Git - rust.git/commitdiff
Assert size of `rustc_parse_format::Piece<'_>`
authorMaybe Waffle <waffle.lapkin@gmail.com>
Thu, 8 Dec 2022 11:20:01 +0000 (11:20 +0000)
committerMaybe Waffle <waffle.lapkin@gmail.com>
Thu, 8 Dec 2022 22:50:39 +0000 (22:50 +0000)
Cargo.lock
compiler/rustc_parse_format/Cargo.toml
compiler/rustc_parse_format/src/lib.rs

index 970b1719aa1202c5e967bf891e326a79d59dad60..50fc0f1a440614118f3b97229da866adf9cfe250 100644 (file)
@@ -4148,6 +4148,7 @@ dependencies = [
 name = "rustc_parse_format"
 version = "0.0.0"
 dependencies = [
+ "rustc_data_structures",
  "rustc_lexer",
 ]
 
index fcc68b3a219cc93bea57983cbe980b31a8b220c8..72da398d3fc1984282fd422763c3fb0a73fe7da5 100644 (file)
@@ -5,3 +5,4 @@ edition = "2021"
 
 [dependencies]
 rustc_lexer = { path = "../rustc_lexer" }
+rustc_data_structures = { path = "../rustc_data_structures" }
index 4d01f706272b119cc5ce22e5eb6b697d31ab2af0..9cbe04c1288effe53ad31e764541f49ef032a23a 100644 (file)
@@ -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;