mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
style: Move size of tests to compile-time tests in the style crate
Same reasoning as the previous commit. Differential Revision: https://phabricator.services.mozilla.com/D146104
This commit is contained in:
parent
50d31686be
commit
f48b95e2e3
13 changed files with 53 additions and 49 deletions
|
@ -128,3 +128,11 @@ macro_rules! local_name {
|
|||
$crate::values::AtomIdent(atom!($s))
|
||||
};
|
||||
}
|
||||
|
||||
/// Asserts the size of a type at compile time.
|
||||
macro_rules! size_of_test {
|
||||
($t: ty, $expected_size: expr) => {
|
||||
#[cfg(target_pointer_width = "64")]
|
||||
const_assert_eq!(std::mem::size_of::<$t>(), $expected_size);
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue