Add a size assertion for NamedMatchVec.

This commit is contained in:
Nicholas Nethercote 2022-03-23 11:44:13 +11:00
parent a4a5e79814
commit 904e70a7b0

View File

@ -103,6 +103,10 @@ struct MatcherTtFrame<'tt> {
type NamedMatchVec = SmallVec<[NamedMatch; 4]>; type NamedMatchVec = SmallVec<[NamedMatch; 4]>;
// This type is used a lot. Make sure it doesn't unintentionally get bigger.
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
rustc_data_structures::static_assert_size!(NamedMatchVec, 72);
/// Represents a single "position" (aka "matcher position", aka "item"), as /// Represents a single "position" (aka "matcher position", aka "item"), as
/// described in the module documentation. /// described in the module documentation.
#[derive(Clone)] #[derive(Clone)]