Further changes required by Servo

This commit is contained in:
Oriol Brufau 2023-08-14 23:00:08 +02:00 committed by Martin Robinson
parent f48b95e2e3
commit a7699d9034
23 changed files with 76 additions and 117 deletions

View file

@ -0,0 +1,14 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
pub use static_assertions::const_assert_eq;
/// Asserts the size of a type at compile time.
#[macro_export]
macro_rules! size_of_test {
($t: ty, $expected_size: expr) => {
#[cfg(target_pointer_width = "64")]
$crate::const_assert_eq!(std::mem::size_of::<$t>(), $expected_size);
};
}