From aa4738c356616cf67156ccfa1bfb618defebeff7 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sat, 7 Dec 2019 12:17:22 +0100 Subject: [PATCH] better way to ignore tests in Miri --- src/offset_of.rs | 2 +- src/span_of.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/offset_of.rs b/src/offset_of.rs index 0308274..894860f 100644 --- a/src/offset_of.rs +++ b/src/offset_of.rs @@ -138,7 +138,7 @@ mod tests { } #[test] - #[cfg(not(miri))] // this creates unaligned references + #[cfg_attr(miri, ignore)] // this creates unaligned references fn offset_simple_packed() { #[repr(C, packed)] struct Foo { diff --git a/src/span_of.rs b/src/span_of.rs index a968f89..e893abf 100644 --- a/src/span_of.rs +++ b/src/span_of.rs @@ -177,7 +177,7 @@ mod tests { } #[test] - #[cfg(not(miri))] // this creates unaligned references + #[cfg_attr(miri, ignore)] // this creates unaligned references fn span_simple_packed() { #[repr(C, packed)] struct Foo {