mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-04 02:54:00 +00:00
Add a static size assertion for MatcherPos
.
This commit is contained in:
parent
11c565f14b
commit
b9fabc3f9c
@ -207,6 +207,10 @@ struct MatcherPos<'root, 'tt> {
|
||||
stack: SmallVec<[MatcherTtFrame<'tt>; 1]>,
|
||||
}
|
||||
|
||||
// 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!(MatcherPos<'_, '_>, 192);
|
||||
|
||||
impl<'root, 'tt> MatcherPos<'root, 'tt> {
|
||||
/// Adds `m` as a named match for the `idx`-th metavar.
|
||||
fn push_match(&mut self, idx: usize, m: NamedMatch) {
|
||||
|
Loading…
Reference in New Issue
Block a user