diff options
Diffstat (limited to 'vendor/rustix/src/check_types.rs')
-rw-r--r-- | vendor/rustix/src/check_types.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/vendor/rustix/src/check_types.rs b/vendor/rustix/src/check_types.rs index 861d7d7b5..bea04e0b7 100644 --- a/vendor/rustix/src/check_types.rs +++ b/vendor/rustix/src/check_types.rs @@ -1,3 +1,5 @@ +//! Macros for checking that types have the same layout as other types. + #![allow(unused_macros)] /// Check that the size and alignment of a type match the `sys` bindings. @@ -77,9 +79,9 @@ macro_rules! check_struct { // Check that we have all the fields. if false { + #[allow(unreachable_code)] let _test = $name { - // SAFETY: This code is guarded by `if false`. - $($field: unsafe { core::mem::zeroed() }),* + $($field: panic!()),* }; } |