diff --git a/Cargo.lock b/Cargo.lock index 8b2dad5b3e..3042ef0186 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -412,7 +412,7 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "zerocopy" -version = "0.8.48" +version = "0.8.49" dependencies = [ "elain", "itertools", @@ -426,7 +426,7 @@ dependencies = [ [[package]] name = "zerocopy-derive" -version = "0.8.48" +version = "0.8.49" dependencies = [ "dissimilar", "prettyplease", diff --git a/Cargo.toml b/Cargo.toml index 90904f93c7..912eaf2635 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,7 @@ [package] edition = "2021" name = "zerocopy" -version = "0.8.48" +version = "0.8.49" authors = [ "Joshua Liebow-Feeser ", "Jack Wrenn ", @@ -124,13 +124,13 @@ __internal_use_only_features_that_work_on_stable = [ ] [dependencies] -zerocopy-derive = { version = "=0.8.48", path = "zerocopy-derive", optional = true } +zerocopy-derive = { version = "=0.8.49", path = "zerocopy-derive", optional = true } # The "associated proc macro pattern" ensures that the versions of zerocopy and # zerocopy-derive remain equal, even if the 'derive' feature isn't used. # See: https://github.com/matklad/macro-dep-test [target.'cfg(any())'.dependencies] -zerocopy-derive = { version = "=0.8.48", path = "zerocopy-derive" } +zerocopy-derive = { version = "=0.8.49", path = "zerocopy-derive" } [dev-dependencies] # FIXME(#381) Remove this dependency once we have our own layout gadgets. @@ -142,4 +142,4 @@ rustversion = "1.0" static_assertions = "1.1" testutil = { path = "testutil" } # In tests, unlike in production, zerocopy-derive is not optional -zerocopy-derive = { version = "=0.8.48", path = "zerocopy-derive" } +zerocopy-derive = { version = "=0.8.49", path = "zerocopy-derive" } diff --git a/src/lib.rs b/src/lib.rs index 0c66144932..3d666cf5df 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -325,7 +325,7 @@ #![cfg_attr(doc_cfg, feature(doc_cfg))] #![cfg_attr(__ZEROCOPY_INTERNAL_USE_ONLY_NIGHTLY_FEATURES_IN_TESTS, feature(coverage_attribute))] #![cfg_attr( - any(__ZEROCOPY_INTERNAL_USE_ONLY_NIGHTLY_FEATURES_IN_TESTS, miri), + any(__ZEROCOPY_INTERNAL_USE_ONLY_NIGHTLY_FEATURES_IN_TESTS, all(test, miri)), feature(layout_for_ptr) )] #![cfg_attr(all(test, __ZEROCOPY_INTERNAL_USE_ONLY_NIGHTLY_FEATURES_IN_TESTS), feature(test))] diff --git a/src/pointer/ptr.rs b/src/pointer/ptr.rs index 30e7a7080f..4ac7b8312f 100644 --- a/src/pointer/ptr.rs +++ b/src/pointer/ptr.rs @@ -233,7 +233,7 @@ mod _conversions { let raw = self.as_inner().as_non_null(); // SAFETY: `self` satisfies the `Aligned` invariant, so we know that // `raw` is validly-aligned for `T`. - #[cfg(miri)] + #[cfg(all(test, miri))] unsafe { crate::util::miri_promise_symbolic_alignment( raw.as_ptr().cast(), @@ -381,7 +381,7 @@ mod _conversions { let mut raw = self.as_inner().as_non_null(); // SAFETY: `self` satisfies the `Aligned` invariant, so we know that // `raw` is validly-aligned for `T`. - #[cfg(miri)] + #[cfg(all(test, miri))] unsafe { crate::util::miri_promise_symbolic_alignment( raw.as_ptr().cast(), diff --git a/zerocopy-derive/Cargo.toml b/zerocopy-derive/Cargo.toml index dd7373012d..343edf87bb 100644 --- a/zerocopy-derive/Cargo.toml +++ b/zerocopy-derive/Cargo.toml @@ -9,7 +9,7 @@ [package] edition = "2021" name = "zerocopy-derive" -version = "0.8.48" +version = "0.8.49" authors = ["Joshua Liebow-Feeser ", "Jack Wrenn "] description = "Custom derive for traits from the zerocopy crate" license = "BSD-2-Clause OR Apache-2.0 OR MIT"