mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Further changes required by Servo
This commit is contained in:
parent
f48b95e2e3
commit
a7699d9034
23 changed files with 76 additions and 117 deletions
14
components/size_of_test/lib.rs
Normal file
14
components/size_of_test/lib.rs
Normal 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);
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue