diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a461d50cc0..2d0d7308c9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,6 +55,7 @@ jobs: # `build.rs`. Each of these represents the minimum Rust version for # which a particular feature is supported. "zerocopy-generic-bounds-in-const-fn", + "zerocopy-target-has-atomics", "zerocopy-aarch64-simd", "zerocopy-panic-in-const" ] @@ -68,6 +69,7 @@ jobs: "riscv64gc-unknown-linux-gnu", "s390x-unknown-linux-gnu", "x86_64-pc-windows-msvc", + "thumbv6m-none-eabi", "wasm32-wasi" ] features: [ @@ -87,6 +89,8 @@ jobs: features: "--all-features" - toolchain: "zerocopy-generic-bounds-in-const-fn" features: "--all-features" + - toolchain: "zerocopy-target-has-atomics" + features: "--all-features" - toolchain: "zerocopy-aarch64-simd" features: "--all-features" - toolchain: "zerocopy-panic-in-const" @@ -105,6 +109,8 @@ jobs: # zerocopy-derive doesn't behave different on these toolchains. - crate: "zerocopy-derive" toolchain: "zerocopy-generic-bounds-in-const-fn" + - crate: "zerocopy-derive" + toolchain: "zerocopy-target-has-atomics" - crate: "zerocopy-derive" toolchain: "zerocopy-aarch64-simd" - crate: "zerocopy-derive" @@ -127,6 +133,8 @@ jobs: target: "s390x-unknown-linux-gnu" - toolchain: "zerocopy-aarch64-simd" target: "x86_64-pc-windows-msvc" + - toolchain: "zerocopy-aarch64-simd" + target: "thumbv6m-none-eabi" - toolchain: "zerocopy-aarch64-simd" target: "wasm32-wasi" # Exclude most targets targets from the @@ -147,8 +155,17 @@ jobs: target: "s390x-unknown-linux-gnu" - toolchain: "zerocopy-generic-bounds-in-const-fn" target: "x86_64-pc-windows-msvc" + - toolchain: "zerocopy-generic-bounds-in-const-fn" + target: "thumbv6m-none-eabi" - toolchain: "zerocopy-generic-bounds-in-const-fn" target: "wasm32-wasi" + # Exclude `thumbv6m-none-eabi` combined with any feature that implies + # the `std` feature since `thumbv6m-none-eabi` does not include a + # pre-compiled std. + - target: "thumbv6m-none-eabi" + features: "--features __internal_use_only_features_that_work_on_stable" + - target: "thumbv6m-none-eabi" + features: "--all-features" # Exclude most targets during PR development, but allow them in the # merge queue. This speeds up our development flow, while still # ensuring that errors on these targets are caught before a PR is @@ -165,6 +182,9 @@ jobs: event_name: "pull_request" - target: "s390x-unknown-linux-gnu" event_name: "pull_request" + # TODO(#1586): Uncomment this before merging. + # - target: "thumbv6m-none-eabi" + # event_name: "pull_request" - target: "wasm32-wasi" event_name: "pull_request" @@ -176,6 +196,19 @@ jobs: - name: Populate cache uses: ./.github/actions/cache + # Ensure that Cargo resolves the minimum possible syn version so that if we + # accidentally make a change which depends upon features added in more + # recent versions of syn, we'll catch it in CI. + # + # TODO(#1595): Debug why this step is still necessary after #1564 and maybe + # remove it. + - name: Pin syn dependency + run: | + set -eo pipefail + # Override the exising `syn` dependency with one which requires an exact + # version. + cargo add -p zerocopy-derive 'syn@=2.0.46' + - name: Configure environment variables run: | set -eo pipefail @@ -240,11 +273,19 @@ jobs: with: key: "${{ matrix.target }}" + # On the `thumbv6m-none-eabi` target, we can't run `cargo check --tests` due + # to the `memchr` crate, so we just do `cargo check` instead. + - name: Check + run: ./cargo.sh +${{ matrix.toolchain }} check --package ${{ matrix.crate }} --target ${{ matrix.target }} ${{ matrix.features }} --verbose + if: matrix.target == 'thumbv6m-none-eabi' + - name: Check tests run: ./cargo.sh +${{ matrix.toolchain }} check --tests --package ${{ matrix.crate }} --target ${{ matrix.target }} ${{ matrix.features }} --verbose + if: matrix.target != 'thumbv6m-none-eabi' - name: Build run: ./cargo.sh +${{ matrix.toolchain }} build --package ${{ matrix.crate }} --target ${{ matrix.target }} ${{ matrix.features }} --verbose + if: matrix.target != 'thumbv6m-none-eabi' # When building tests for the i686 target, we need certain libraries which # are not installed by default; `gcc-multilib` includes these libraries. @@ -359,13 +400,19 @@ jobs: matrix.target != 'wasm32-wasi' && github.event_name != 'pull_request' - - name: Clippy check + # On the `thumbv6m-none-eabi` target, we can't run `cargo clippy --tests` + # due to the `memchr` crate, so we just do `cargo clippy` instead. + - name: Clippy + run: ./cargo.sh +${{ matrix.toolchain }} clippy --package ${{ matrix.crate }} --target ${{ matrix.target }} ${{ matrix.features }} --verbose + if: matrix.toolchain == 'nightly' && matrix.target == 'thumbv6m-none-eabi' + + - name: Clippy tests run: ./cargo.sh +${{ matrix.toolchain }} clippy --package ${{ matrix.crate }} --target ${{ matrix.target }} ${{ matrix.features }} --tests --verbose # Clippy improves the accuracy of lints over time, and fixes bugs. Only # running Clippy on nightly allows us to avoid having to write code which # is compatible with older versions of Clippy, which sometimes requires # hacks to work around limitations that are fixed in more recent versions. - if: matrix.toolchain == 'nightly' + if: matrix.toolchain == 'nightly' && matrix.target != 'thumbv6m-none-eabi' - name: Cargo doc # We pass --document-private-items and --document-hidden items to ensure that @@ -544,6 +591,9 @@ jobs: # See comment on "Pin syn dependency" job for why we do this. It needs # to happen before the subsequent `cargo check`, so we don't # background it. + # + # TODO(#1595): Debug why this step is still necessary after #1564 and + # maybe remove it. cargo add -p zerocopy-derive 'syn@=2.0.46' &> /dev/null cargo check --workspace --tests &> /dev/null & diff --git a/Cargo.toml b/Cargo.toml index 0f6c354c4e..0d1dd6770f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,6 +35,10 @@ exclude = [".*"] # From 1.61.0, Rust supports generic types with trait bounds in `const fn`. zerocopy-generic-bounds-in-const-fn = "1.61.0" +# From 1.60.0, Rust supports `cfg(target_has_atomics)`, which allows us to +# detect whether a target supports particular sets of atomics. +zerocopy-target-has-atomics = "1.60.0" + # When the "simd" feature is enabled, include SIMD types from the # `core::arch::aarch64` module, which was stabilized in 1.59.0. On earlier Rust # versions, these types require the "simd-nightly" feature. diff --git a/src/impls.rs b/src/impls.rs index 1933710723..5e5349503d 100644 --- a/src/impls.rs +++ b/src/impls.rs @@ -440,49 +440,151 @@ safety_comment! { unsafe_impl_for_power_set!(A, B, C, D, E, F, G, H, I, J, K, L -> M => Immutable for opt_extern_c_fn!(...)); } -macro_rules! impl_traits_for_atomics { - ($($atomics:ident),* $(,)?) => { - $( - impl_for_transparent_wrapper!(=> TryFromBytes for $atomics); - impl_for_transparent_wrapper!(=> FromZeros for $atomics); - impl_for_transparent_wrapper!(=> FromBytes for $atomics); - impl_for_transparent_wrapper!(=> IntoBytes for $atomics); - )* - }; -} +#[cfg(all( + zerocopy_target_has_atomics, + any( + target_has_atomic = "8", + target_has_atomic = "16", + target_has_atomic = "32", + target_has_atomic = "64", + target_has_atomic = "ptr" + ) +))] +mod atomics { + use super::*; -#[rustfmt::skip] -impl_traits_for_atomics!( - AtomicI16, AtomicI32, AtomicI8, AtomicIsize, - AtomicU16, AtomicU32, AtomicU8, AtomicUsize, -); + macro_rules! impl_traits_for_atomics { + ($($atomics:ident),* $(,)?) => { + $( + impl_known_layout!($atomics); + impl_for_transparent_wrapper!(=> TryFromBytes for $atomics); + impl_for_transparent_wrapper!(=> FromZeros for $atomics); + impl_for_transparent_wrapper!(=> FromBytes for $atomics); + impl_for_transparent_wrapper!(=> IntoBytes for $atomics); + )* + }; + } -impl_for_transparent_wrapper!(=> TryFromBytes for AtomicBool); -impl_for_transparent_wrapper!(=> FromZeros for AtomicBool); -impl_for_transparent_wrapper!(=> IntoBytes for AtomicBool); + #[cfg(target_has_atomic = "8")] + #[cfg_attr(doc_cfg, doc(cfg(target_has_atomic = "8")))] + mod atomic_8 { + use core::sync::atomic::{AtomicBool, AtomicI8, AtomicU8}; + + use super::*; + + impl_traits_for_atomics!(AtomicU8, AtomicI8); + + impl_known_layout!(AtomicBool); + + impl_for_transparent_wrapper!(=> TryFromBytes for AtomicBool); + impl_for_transparent_wrapper!(=> FromZeros for AtomicBool); + impl_for_transparent_wrapper!(=> IntoBytes for AtomicBool); + + safety_comment! { + /// SAFETY: + /// Per [1], `AtomicBool`, `AtomicU8`, and `AtomicI8` have the same + /// size as `bool`, `u8`, and `i8` respectively. Since a type's + /// alignment cannot be smaller than 1 [2], and since its alignment + /// cannot be greater than its size [3], the only possible value for + /// the alignment is 1. Thus, it is sound to implement `Unaligned`. + /// + /// [1] TODO(#896), TODO(https://github.com/rust-lang/rust/pull/121943): + /// Cite docs once they've landed. + /// + /// [2] Per https://doc.rust-lang.org/reference/type-layout.html#size-and-alignment: + /// + /// Alignment is measured in bytes, and must be at least 1. + /// + /// [3] Per https://doc.rust-lang.org/reference/type-layout.html#size-and-alignment: + /// + /// The size of a value is always a multiple of its alignment. + unsafe_impl!(AtomicBool: Unaligned); + unsafe_impl!(AtomicU8: Unaligned); + unsafe_impl!(AtomicI8: Unaligned); + assert_unaligned!(AtomicBool, AtomicU8, AtomicI8); + + /// SAFETY: + /// All of these pass an atomic type and that type's native equivalent, as + /// required by the macro safety preconditions. + unsafe_impl_transparent_wrapper_for_atomic!(AtomicU8 [u8], AtomicI8 [i8], AtomicBool [bool]); + } + } -safety_comment! { - /// SAFETY: - /// Per [1], `AtomicBool`, `AtomicU8`, and `AtomicI8` have the same size as - /// `bool`, `u8`, and `i8` respectively. Since a type's alignment cannot be - /// smaller than 1 [2], and since its alignment cannot be greater than its - /// size [3], the only possible value for the alignment is 1. Thus, it is - /// sound to implement `Unaligned`. - /// - /// [1] TODO(#896), TODO(https://github.com/rust-lang/rust/pull/121943): - /// Cite docs once they've landed. - /// - /// [2] Per https://doc.rust-lang.org/reference/type-layout.html#size-and-alignment: - /// - /// Alignment is measured in bytes, and must be at least 1. - /// - /// [3] Per https://doc.rust-lang.org/reference/type-layout.html#size-and-alignment: - /// - /// The size of a value is always a multiple of its alignment. - unsafe_impl!(AtomicBool: Unaligned); - unsafe_impl!(AtomicU8: Unaligned); - unsafe_impl!(AtomicI8: Unaligned); - assert_unaligned!(AtomicBool, AtomicU8, AtomicI8); + #[cfg(target_has_atomic = "16")] + #[cfg_attr(doc_cfg, doc(cfg(target_has_atomic = "16")))] + mod atomic_16 { + use core::sync::atomic::{AtomicI16, AtomicU16}; + + use super::*; + + impl_traits_for_atomics!(AtomicU16, AtomicI16); + + safety_comment! { + /// SAFETY: + /// All of these pass an atomic type and that type's native equivalent, as + /// required by the macro safety preconditions. + unsafe_impl_transparent_wrapper_for_atomic!(AtomicU16 [u16], AtomicI16 [i16]); + } + } + + #[cfg(target_has_atomic = "32")] + #[cfg_attr(doc_cfg, doc(cfg(target_has_atomic = "32")))] + mod atomic_32 { + use core::sync::atomic::{AtomicI32, AtomicU32}; + + use super::*; + + impl_traits_for_atomics!(AtomicU32, AtomicI32); + + safety_comment! { + /// SAFETY: + /// All of these pass an atomic type and that type's native equivalent, as + /// required by the macro safety preconditions. + unsafe_impl_transparent_wrapper_for_atomic!(AtomicU32 [u32], AtomicI32 [i32]); + } + } + + #[cfg(target_has_atomic = "64")] + #[cfg_attr(doc_cfg, doc(cfg(target_has_atomic = "64")))] + mod atomic_64 { + use core::sync::atomic::{AtomicI64, AtomicU64}; + + use super::*; + + impl_traits_for_atomics!(AtomicU64, AtomicI64); + + safety_comment! { + /// SAFETY: + /// All of these pass an atomic type and that type's native equivalent, as + /// required by the macro safety preconditions. + unsafe_impl_transparent_wrapper_for_atomic!(AtomicU64 [u64], AtomicI64 [i64]); + } + } + + #[cfg(target_has_atomic = "ptr")] + #[cfg_attr(doc_cfg, doc(cfg(target_has_atomic = "ptr")))] + mod atomic_ptr { + use core::sync::atomic::{AtomicIsize, AtomicPtr, AtomicUsize}; + + use super::*; + + impl_traits_for_atomics!(AtomicUsize, AtomicIsize); + + impl_known_layout!(T => AtomicPtr); + + // TODO(#170): Implement `FromBytes` and `IntoBytes` once we implement + // those traits for `*mut T`. + impl_for_transparent_wrapper!(T => TryFromBytes for AtomicPtr); + impl_for_transparent_wrapper!(T => FromZeros for AtomicPtr); + + safety_comment! { + /// SAFETY: + /// This passes an atomic type and that type's native equivalent, as + /// required by the macro safety preconditions. + unsafe_impl_transparent_wrapper_for_atomic!(AtomicUsize [usize], AtomicIsize [isize]); + unsafe_impl_transparent_wrapper_for_atomic!(T => AtomicPtr [*mut T]); + } + } } safety_comment! { diff --git a/src/lib.rs b/src/lib.rs index 4dfe7705ee..7e38f882eb 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -296,6 +296,8 @@ extern crate self as zerocopy; #[macro_use] mod macros; +#[macro_use] +mod util; pub mod byte_slice; pub mod byteorder; @@ -313,7 +315,6 @@ pub mod macro_util; #[doc(hidden)] pub mod pointer; mod r#ref; -mod util; // TODO(#252): If we make this pub, come up with a better name. mod wrappers; @@ -337,10 +338,6 @@ use core::{ ops::{Deref, DerefMut}, ptr::{self, NonNull}, slice, - sync::atomic::{ - AtomicBool, AtomicI16, AtomicI32, AtomicI8, AtomicIsize, AtomicPtr, AtomicU16, AtomicU32, - AtomicU8, AtomicUsize, - }, }; use crate::pointer::{invariant, BecauseExclusive, BecauseImmutable}; @@ -819,9 +816,7 @@ impl_known_layout!( u8, i8, u16, i16, u32, i32, u64, i64, u128, i128, usize, isize, f32, f64, bool, char, NonZeroU8, NonZeroI8, NonZeroU16, NonZeroI16, NonZeroU32, NonZeroI32, - NonZeroU64, NonZeroI64, NonZeroU128, NonZeroI128, NonZeroUsize, NonZeroIsize, - AtomicBool, AtomicI16, AtomicI32, AtomicI8, AtomicIsize, AtomicU16, AtomicU32, - AtomicU8, AtomicUsize + NonZeroU64, NonZeroI64, NonZeroU128, NonZeroI128, NonZeroUsize, NonZeroIsize ); #[rustfmt::skip] impl_known_layout!( @@ -830,8 +825,7 @@ impl_known_layout!( T => Wrapping, T => MaybeUninit, T: ?Sized => *const T, - T: ?Sized => *mut T, - T => AtomicPtr + T: ?Sized => *mut T ); impl_known_layout!(const N: usize, T => [T; N]); diff --git a/src/util.rs b/src/util.rs index 467544ea50..e2b4fbe436 100644 --- a/src/util.rs +++ b/src/util.rs @@ -12,10 +12,6 @@ use core::{ mem::{self, ManuallyDrop, MaybeUninit}, num::{NonZeroUsize, Wrapping}, ptr::NonNull, - sync::atomic::{ - AtomicBool, AtomicI16, AtomicI32, AtomicI8, AtomicIsize, AtomicPtr, AtomicU16, AtomicU32, - AtomicU8, AtomicUsize, - }, }; use crate::{ @@ -332,12 +328,22 @@ unsafe impl TransparentWrapper for Unalign { /// /// The caller promises that `$atomic` is an atomic type whose natie equivalent /// is `$native`. +#[cfg(all( + zerocopy_target_has_atomics, + any( + target_has_atomic = "8", + target_has_atomic = "16", + target_has_atomic = "32", + target_has_atomic = "64", + target_has_atomic = "ptr" + ) +))] macro_rules! unsafe_impl_transparent_wrapper_for_atomic { ($(#[$attr:meta])* $(,)?) => {}; ($(#[$attr:meta])* $atomic:ty [$native:ty], $($atomics:ty [$natives:ty]),* $(,)?) => { $(#[$attr])* // SAFETY: See safety comment in next match arm. - unsafe impl TransparentWrapper for $atomic { + unsafe impl crate::util::TransparentWrapper for $atomic { unsafe_impl_transparent_wrapper_for_atomic!(@inner $atomic [$native]); } unsafe_impl_transparent_wrapper_for_atomic!($(#[$attr])* $($atomics [$natives],)*); @@ -351,7 +357,7 @@ macro_rules! unsafe_impl_transparent_wrapper_for_atomic { // [1] TODO(#896), TODO(https://github.com/rust-lang/rust/pull/121943): // Cite docs once they've landed. $(#[$attr])* - unsafe impl<$tyvar, I: Invariants> TransparentWrapper for $atomic { + unsafe impl<$tyvar, I: crate::invariant::Invariants> crate::util::TransparentWrapper for $atomic { unsafe_impl_transparent_wrapper_for_atomic!(@inner $atomic [$native]); } }; @@ -381,11 +387,11 @@ macro_rules! unsafe_impl_transparent_wrapper_for_atomic { // // [1] TODO(#896), TODO(https://github.com/rust-lang/rust/pull/121943): // Cite docs once they've landed. - type UnsafeCellVariance = Covariant; + type UnsafeCellVariance = crate::util::Covariant; // SAFETY: No safety justification is required for an invariant // variance. - type AlignmentVariance = Invariant; + type AlignmentVariance = crate::util::Invariant; // SAFETY: Per [1], all atomic types have the same bit validity as their // native counterparts. The caller has promised that `$atomic` and @@ -394,7 +400,7 @@ macro_rules! unsafe_impl_transparent_wrapper_for_atomic { // // [1] TODO(#896), TODO(https://github.com/rust-lang/rust/pull/121943): // Cite docs once they've landed. - type ValidityVariance = Covariant; + type ValidityVariance = crate::util::Covariant; fn cast_into_inner(ptr: *mut $atomic) -> *mut UnsafeCell<$native> { // SAFETY: Per [1] (from comment on impl block), `$atomic` has the @@ -414,24 +420,6 @@ macro_rules! unsafe_impl_transparent_wrapper_for_atomic { }; } -safety_comment! { - /// SAFETY: - /// All of these pass an atomic type and that type's native equivalent, as - /// required by the macro safety preconditions. - unsafe_impl_transparent_wrapper_for_atomic!(T => AtomicPtr [*mut T]); - unsafe_impl_transparent_wrapper_for_atomic!( - AtomicBool [bool], - AtomicI16 [i16], AtomicI32 [i32], AtomicI8 [i8], AtomicIsize [isize], - AtomicU16 [u16], AtomicU32 [u32], AtomicU8 [u8], AtomicUsize [usize], - ); - #[cfg(not(target_arch = "powerpc"))] - unsafe_impl_transparent_wrapper_for_atomic!( - #[cfg_attr(doc_cfg, doc(cfg(not(target_arch = "powerpc"))))] - core::sync::atomic::AtomicI64 [i64], - core::sync::atomic::AtomicU64 [u64], - ); -} - /// Like [`PhantomData`], but [`Send`] and [`Sync`] regardless of whether the /// wrapped `T` is. pub(crate) struct SendSyncPhantomData(PhantomData); diff --git a/tests/ui-nightly/include_value_not_from_bytes.stderr b/tests/ui-nightly/include_value_not_from_bytes.stderr index bc67ccb38b..7974607ecb 100644 --- a/tests/ui-nightly/include_value_not_from_bytes.stderr +++ b/tests/ui-nightly/include_value_not_from_bytes.stderr @@ -12,10 +12,10 @@ error[E0277]: the trait bound `NotZerocopy: zerocopy::FromBytes` is not sat AU16 AtomicI16 AtomicI32 + AtomicI64 AtomicI8 AtomicIsize AtomicU16 - AtomicU32 and $N others note: required by a bound in `AssertIsFromBytes` --> tests/ui-nightly/include_value_not_from_bytes.rs:15:42 diff --git a/tests/ui-nightly/transmute-dst-not-frombytes.stderr b/tests/ui-nightly/transmute-dst-not-frombytes.stderr index 1edc54b919..8c90c2bd45 100644 --- a/tests/ui-nightly/transmute-dst-not-frombytes.stderr +++ b/tests/ui-nightly/transmute-dst-not-frombytes.stderr @@ -12,10 +12,10 @@ error[E0277]: the trait bound `NotZerocopy: zerocopy::FromBytes` is not satisfie AU16 AtomicI16 AtomicI32 + AtomicI64 AtomicI8 AtomicIsize AtomicU16 - AtomicU32 and $N others note: required by a bound in `AssertIsFromBytes` --> tests/ui-nightly/transmute-dst-not-frombytes.rs:19:41 diff --git a/tests/ui-nightly/transmute-mut-dst-not-frombytes.stderr b/tests/ui-nightly/transmute-mut-dst-not-frombytes.stderr index 94bec562c9..b92f2eadc2 100644 --- a/tests/ui-nightly/transmute-mut-dst-not-frombytes.stderr +++ b/tests/ui-nightly/transmute-mut-dst-not-frombytes.stderr @@ -11,11 +11,11 @@ error[E0277]: the trait bound `Dst: FromBytes` is not satisfied () AtomicI16 AtomicI32 + AtomicI64 AtomicI8 AtomicIsize AtomicU16 AtomicU32 - AtomicU8 and $N others note: required by a bound in `AssertDstIsFromBytes` --> tests/ui-nightly/transmute-mut-dst-not-frombytes.rs:24:38 diff --git a/tests/ui-nightly/transmute-mut-dst-not-intobytes.stderr b/tests/ui-nightly/transmute-mut-dst-not-intobytes.stderr index 49991c14ff..9702273272 100644 --- a/tests/ui-nightly/transmute-mut-dst-not-intobytes.stderr +++ b/tests/ui-nightly/transmute-mut-dst-not-intobytes.stderr @@ -12,10 +12,10 @@ error[E0277]: the trait bound `Dst: IntoBytes` is not satisfied AtomicBool AtomicI16 AtomicI32 + AtomicI64 AtomicI8 AtomicIsize AtomicU16 - AtomicU32 and $N others note: required by a bound in `AssertDstIsIntoBytes` --> tests/ui-nightly/transmute-mut-dst-not-intobytes.rs:24:36 diff --git a/tests/ui-nightly/transmute-mut-src-not-frombytes.stderr b/tests/ui-nightly/transmute-mut-src-not-frombytes.stderr index 912e7bd2a2..88258f36d8 100644 --- a/tests/ui-nightly/transmute-mut-src-not-frombytes.stderr +++ b/tests/ui-nightly/transmute-mut-src-not-frombytes.stderr @@ -11,11 +11,11 @@ error[E0277]: the trait bound `Src: FromBytes` is not satisfied () AtomicI16 AtomicI32 + AtomicI64 AtomicI8 AtomicIsize AtomicU16 AtomicU32 - AtomicU8 and $N others note: required by a bound in `AssertSrcIsFromBytes` --> tests/ui-nightly/transmute-mut-src-not-frombytes.rs:24:38 @@ -34,11 +34,11 @@ error[E0277]: the trait bound `Src: FromBytes` is not satisfied () AtomicI16 AtomicI32 + AtomicI64 AtomicI8 AtomicIsize AtomicU16 AtomicU32 - AtomicU8 and $N others note: required by a bound in `AssertSrcIsFromBytes` --> tests/ui-nightly/transmute-mut-src-not-frombytes.rs:24:38 diff --git a/tests/ui-nightly/transmute-mut-src-not-intobytes.stderr b/tests/ui-nightly/transmute-mut-src-not-intobytes.stderr index 5907bad499..c47004d8c0 100644 --- a/tests/ui-nightly/transmute-mut-src-not-intobytes.stderr +++ b/tests/ui-nightly/transmute-mut-src-not-intobytes.stderr @@ -12,10 +12,10 @@ error[E0277]: the trait bound `Src: IntoBytes` is not satisfied AtomicBool AtomicI16 AtomicI32 + AtomicI64 AtomicI8 AtomicIsize AtomicU16 - AtomicU32 and $N others note: required by a bound in `AssertSrcIsIntoBytes` --> tests/ui-nightly/transmute-mut-src-not-intobytes.rs:24:36 @@ -35,10 +35,10 @@ error[E0277]: the trait bound `Src: IntoBytes` is not satisfied AtomicBool AtomicI16 AtomicI32 + AtomicI64 AtomicI8 AtomicIsize AtomicU16 - AtomicU32 and $N others note: required by a bound in `AssertSrcIsIntoBytes` --> tests/ui-nightly/transmute-mut-src-not-intobytes.rs:24:36 diff --git a/tests/ui-nightly/transmute-ref-dst-not-frombytes.stderr b/tests/ui-nightly/transmute-ref-dst-not-frombytes.stderr index f52f711f74..c1a638f299 100644 --- a/tests/ui-nightly/transmute-ref-dst-not-frombytes.stderr +++ b/tests/ui-nightly/transmute-ref-dst-not-frombytes.stderr @@ -12,10 +12,10 @@ error[E0277]: the trait bound `Dst: zerocopy::FromBytes` is not satisfied AU16 AtomicI16 AtomicI32 + AtomicI64 AtomicI8 AtomicIsize AtomicU16 - AtomicU32 and $N others note: required by a bound in `AssertDstIsFromBytes` --> tests/ui-nightly/transmute-ref-dst-not-frombytes.rs:23:34 diff --git a/tests/ui-nightly/transmute-ref-src-not-intobytes.stderr b/tests/ui-nightly/transmute-ref-src-not-intobytes.stderr index 8cac27acc3..7085623417 100644 --- a/tests/ui-nightly/transmute-ref-src-not-intobytes.stderr +++ b/tests/ui-nightly/transmute-ref-src-not-intobytes.stderr @@ -13,9 +13,9 @@ error[E0277]: the trait bound `Src: zerocopy::IntoBytes` is not satisfied AtomicBool AtomicI16 AtomicI32 + AtomicI64 AtomicI8 AtomicIsize - AtomicU16 and $N others note: required by a bound in `AssertSrcIsIntoBytes` --> tests/ui-nightly/transmute-ref-src-not-intobytes.rs:23:33 @@ -36,9 +36,9 @@ error[E0277]: the trait bound `Src: zerocopy::IntoBytes` is not satisfied AtomicBool AtomicI16 AtomicI32 + AtomicI64 AtomicI8 AtomicIsize - AtomicU16 and $N others note: required by a bound in `AssertSrcIsIntoBytes` --> tests/ui-nightly/transmute-ref-src-not-intobytes.rs:23:33 diff --git a/tests/ui-nightly/transmute-src-not-intobytes.stderr b/tests/ui-nightly/transmute-src-not-intobytes.stderr index 110a8e7583..54d16e1e49 100644 --- a/tests/ui-nightly/transmute-src-not-intobytes.stderr +++ b/tests/ui-nightly/transmute-src-not-intobytes.stderr @@ -13,9 +13,9 @@ error[E0277]: the trait bound `NotZerocopy: zerocopy::IntoBytes` is not sa AtomicBool AtomicI16 AtomicI32 + AtomicI64 AtomicI8 AtomicIsize - AtomicU16 and $N others note: required by a bound in `AssertIsIntoBytes` --> tests/ui-nightly/transmute-src-not-intobytes.rs:19:32 @@ -36,9 +36,9 @@ error[E0277]: the trait bound `NotZerocopy: zerocopy::IntoBytes` is not sa AtomicBool AtomicI16 AtomicI32 + AtomicI64 AtomicI8 AtomicIsize - AtomicU16 and $N others note: required by a bound in `AssertIsIntoBytes` --> tests/ui-nightly/transmute-src-not-intobytes.rs:19:32 diff --git a/tests/ui-nightly/try_transmute-dst-not-tryfrombytes.stderr b/tests/ui-nightly/try_transmute-dst-not-tryfrombytes.stderr index f15626848c..6e96a9f86a 100644 --- a/tests/ui-nightly/try_transmute-dst-not-tryfrombytes.stderr +++ b/tests/ui-nightly/try_transmute-dst-not-tryfrombytes.stderr @@ -12,7 +12,7 @@ error[E0277]: the trait bound `NotZerocopy: TryFromBytes` is not satisfied AtomicBool AtomicI16 AtomicI32 - AtomicI8 + AtomicI64 and $N others note: required by a bound in `ValidityError` --> src/error.rs @@ -34,7 +34,7 @@ error[E0277]: the trait bound `NotZerocopy: TryFromBytes` is not satisfied AtomicBool AtomicI16 AtomicI32 - AtomicI8 + AtomicI64 and $N others note: required by a bound in `try_transmute` --> src/macro_util.rs @@ -60,7 +60,7 @@ error[E0277]: the trait bound `NotZerocopy: TryFromBytes` is not satisfied AtomicBool AtomicI16 AtomicI32 - AtomicI8 + AtomicI64 and $N others note: required by a bound in `ValidityError` --> src/error.rs diff --git a/tests/ui-nightly/try_transmute-src-not-intobytes.stderr b/tests/ui-nightly/try_transmute-src-not-intobytes.stderr index aef2978b84..e6bb77382b 100644 --- a/tests/ui-nightly/try_transmute-src-not-intobytes.stderr +++ b/tests/ui-nightly/try_transmute-src-not-intobytes.stderr @@ -10,9 +10,9 @@ error[E0277]: the trait bound `NotZerocopy: zerocopy::IntoBytes` is not sa AtomicBool AtomicI16 AtomicI32 + AtomicI64 AtomicI8 AtomicIsize - AtomicU16 and $N others note: required by a bound in `try_transmute` --> src/macro_util.rs diff --git a/tests/ui-stable/include_value_not_from_bytes.stderr b/tests/ui-stable/include_value_not_from_bytes.stderr index 611c1a8858..a26d751923 100644 --- a/tests/ui-stable/include_value_not_from_bytes.stderr +++ b/tests/ui-stable/include_value_not_from_bytes.stderr @@ -12,10 +12,10 @@ error[E0277]: the trait bound `NotZerocopy: zerocopy::FromBytes` is not sat AU16 AtomicI16 AtomicI32 + AtomicI64 AtomicI8 AtomicIsize AtomicU16 - AtomicU32 and $N others note: required by a bound in `AssertIsFromBytes` --> tests/ui-stable/include_value_not_from_bytes.rs:15:42 diff --git a/tests/ui-stable/transmute-dst-not-frombytes.stderr b/tests/ui-stable/transmute-dst-not-frombytes.stderr index b3408a0f48..92daccf0d4 100644 --- a/tests/ui-stable/transmute-dst-not-frombytes.stderr +++ b/tests/ui-stable/transmute-dst-not-frombytes.stderr @@ -12,10 +12,10 @@ error[E0277]: the trait bound `NotZerocopy: zerocopy::FromBytes` is not satisfie AU16 AtomicI16 AtomicI32 + AtomicI64 AtomicI8 AtomicIsize AtomicU16 - AtomicU32 and $N others note: required by a bound in `AssertIsFromBytes` --> tests/ui-stable/transmute-dst-not-frombytes.rs:19:41 diff --git a/tests/ui-stable/transmute-mut-dst-not-frombytes.stderr b/tests/ui-stable/transmute-mut-dst-not-frombytes.stderr index e1647870a8..ac780ba7d2 100644 --- a/tests/ui-stable/transmute-mut-dst-not-frombytes.stderr +++ b/tests/ui-stable/transmute-mut-dst-not-frombytes.stderr @@ -11,11 +11,11 @@ error[E0277]: the trait bound `Dst: FromBytes` is not satisfied () AtomicI16 AtomicI32 + AtomicI64 AtomicI8 AtomicIsize AtomicU16 AtomicU32 - AtomicU8 and $N others note: required by a bound in `AssertDstIsFromBytes` --> tests/ui-stable/transmute-mut-dst-not-frombytes.rs:24:38 diff --git a/tests/ui-stable/transmute-mut-dst-not-intobytes.stderr b/tests/ui-stable/transmute-mut-dst-not-intobytes.stderr index 78cf5ffc0f..cf81108c7f 100644 --- a/tests/ui-stable/transmute-mut-dst-not-intobytes.stderr +++ b/tests/ui-stable/transmute-mut-dst-not-intobytes.stderr @@ -12,10 +12,10 @@ error[E0277]: the trait bound `Dst: IntoBytes` is not satisfied AtomicBool AtomicI16 AtomicI32 + AtomicI64 AtomicI8 AtomicIsize AtomicU16 - AtomicU32 and $N others note: required by a bound in `AssertDstIsIntoBytes` --> tests/ui-stable/transmute-mut-dst-not-intobytes.rs:24:36 diff --git a/tests/ui-stable/transmute-mut-src-not-frombytes.stderr b/tests/ui-stable/transmute-mut-src-not-frombytes.stderr index 951bf82c88..ba16a1c841 100644 --- a/tests/ui-stable/transmute-mut-src-not-frombytes.stderr +++ b/tests/ui-stable/transmute-mut-src-not-frombytes.stderr @@ -11,11 +11,11 @@ error[E0277]: the trait bound `Src: FromBytes` is not satisfied () AtomicI16 AtomicI32 + AtomicI64 AtomicI8 AtomicIsize AtomicU16 AtomicU32 - AtomicU8 and $N others note: required by a bound in `AssertSrcIsFromBytes` --> tests/ui-stable/transmute-mut-src-not-frombytes.rs:24:38 @@ -34,11 +34,11 @@ error[E0277]: the trait bound `Src: FromBytes` is not satisfied () AtomicI16 AtomicI32 + AtomicI64 AtomicI8 AtomicIsize AtomicU16 AtomicU32 - AtomicU8 and $N others note: required by a bound in `AssertSrcIsFromBytes` --> tests/ui-stable/transmute-mut-src-not-frombytes.rs:24:38 diff --git a/tests/ui-stable/transmute-mut-src-not-intobytes.stderr b/tests/ui-stable/transmute-mut-src-not-intobytes.stderr index fb1a31f314..c3676424aa 100644 --- a/tests/ui-stable/transmute-mut-src-not-intobytes.stderr +++ b/tests/ui-stable/transmute-mut-src-not-intobytes.stderr @@ -12,10 +12,10 @@ error[E0277]: the trait bound `Src: IntoBytes` is not satisfied AtomicBool AtomicI16 AtomicI32 + AtomicI64 AtomicI8 AtomicIsize AtomicU16 - AtomicU32 and $N others note: required by a bound in `AssertSrcIsIntoBytes` --> tests/ui-stable/transmute-mut-src-not-intobytes.rs:24:36 @@ -35,10 +35,10 @@ error[E0277]: the trait bound `Src: IntoBytes` is not satisfied AtomicBool AtomicI16 AtomicI32 + AtomicI64 AtomicI8 AtomicIsize AtomicU16 - AtomicU32 and $N others note: required by a bound in `AssertSrcIsIntoBytes` --> tests/ui-stable/transmute-mut-src-not-intobytes.rs:24:36 diff --git a/tests/ui-stable/transmute-ref-dst-not-frombytes.stderr b/tests/ui-stable/transmute-ref-dst-not-frombytes.stderr index 24067665a2..19d9f0e339 100644 --- a/tests/ui-stable/transmute-ref-dst-not-frombytes.stderr +++ b/tests/ui-stable/transmute-ref-dst-not-frombytes.stderr @@ -12,10 +12,10 @@ error[E0277]: the trait bound `Dst: zerocopy::FromBytes` is not satisfied AU16 AtomicI16 AtomicI32 + AtomicI64 AtomicI8 AtomicIsize AtomicU16 - AtomicU32 and $N others note: required by a bound in `AssertDstIsFromBytes` --> tests/ui-stable/transmute-ref-dst-not-frombytes.rs:23:34 diff --git a/tests/ui-stable/transmute-ref-src-not-intobytes.stderr b/tests/ui-stable/transmute-ref-src-not-intobytes.stderr index 27fe6210d3..b4292d5c8e 100644 --- a/tests/ui-stable/transmute-ref-src-not-intobytes.stderr +++ b/tests/ui-stable/transmute-ref-src-not-intobytes.stderr @@ -13,9 +13,9 @@ error[E0277]: the trait bound `Src: zerocopy::IntoBytes` is not satisfied AtomicBool AtomicI16 AtomicI32 + AtomicI64 AtomicI8 AtomicIsize - AtomicU16 and $N others note: required by a bound in `AssertSrcIsIntoBytes` --> tests/ui-stable/transmute-ref-src-not-intobytes.rs:23:33 @@ -36,9 +36,9 @@ error[E0277]: the trait bound `Src: zerocopy::IntoBytes` is not satisfied AtomicBool AtomicI16 AtomicI32 + AtomicI64 AtomicI8 AtomicIsize - AtomicU16 and $N others note: required by a bound in `AssertSrcIsIntoBytes` --> tests/ui-stable/transmute-ref-src-not-intobytes.rs:23:33 diff --git a/tests/ui-stable/transmute-src-not-intobytes.stderr b/tests/ui-stable/transmute-src-not-intobytes.stderr index 9f8c1508f7..d503507f0e 100644 --- a/tests/ui-stable/transmute-src-not-intobytes.stderr +++ b/tests/ui-stable/transmute-src-not-intobytes.stderr @@ -13,9 +13,9 @@ error[E0277]: the trait bound `NotZerocopy: zerocopy::IntoBytes` is not sa AtomicBool AtomicI16 AtomicI32 + AtomicI64 AtomicI8 AtomicIsize - AtomicU16 and $N others note: required by a bound in `AssertIsIntoBytes` --> tests/ui-stable/transmute-src-not-intobytes.rs:19:32 @@ -36,9 +36,9 @@ error[E0277]: the trait bound `NotZerocopy: zerocopy::IntoBytes` is not sa AtomicBool AtomicI16 AtomicI32 + AtomicI64 AtomicI8 AtomicIsize - AtomicU16 and $N others note: required by a bound in `AssertIsIntoBytes` --> tests/ui-stable/transmute-src-not-intobytes.rs:19:32 diff --git a/tests/ui-stable/try_transmute-dst-not-tryfrombytes.stderr b/tests/ui-stable/try_transmute-dst-not-tryfrombytes.stderr index fa3772a1be..5140c50e21 100644 --- a/tests/ui-stable/try_transmute-dst-not-tryfrombytes.stderr +++ b/tests/ui-stable/try_transmute-dst-not-tryfrombytes.stderr @@ -12,7 +12,7 @@ error[E0277]: the trait bound `NotZerocopy: TryFromBytes` is not satisfied AtomicBool AtomicI16 AtomicI32 - AtomicI8 + AtomicI64 and $N others note: required by a bound in `ValidityError` --> src/error.rs @@ -34,7 +34,7 @@ error[E0277]: the trait bound `NotZerocopy: TryFromBytes` is not satisfied AtomicBool AtomicI16 AtomicI32 - AtomicI8 + AtomicI64 and $N others note: required by a bound in `try_transmute` --> src/macro_util.rs @@ -60,7 +60,7 @@ error[E0277]: the trait bound `NotZerocopy: TryFromBytes` is not satisfied AtomicBool AtomicI16 AtomicI32 - AtomicI8 + AtomicI64 and $N others note: required by a bound in `ValidityError` --> src/error.rs diff --git a/tests/ui-stable/try_transmute-src-not-intobytes.stderr b/tests/ui-stable/try_transmute-src-not-intobytes.stderr index 0ba29b075f..888343c24d 100644 --- a/tests/ui-stable/try_transmute-src-not-intobytes.stderr +++ b/tests/ui-stable/try_transmute-src-not-intobytes.stderr @@ -10,9 +10,9 @@ error[E0277]: the trait bound `NotZerocopy: zerocopy::IntoBytes` is not sa AtomicBool AtomicI16 AtomicI32 + AtomicI64 AtomicI8 AtomicIsize - AtomicU16 and $N others note: required by a bound in `try_transmute` --> src/macro_util.rs diff --git a/testutil/Cargo.toml b/testutil/Cargo.toml index c5425455ee..b6fafef354 100644 --- a/testutil/Cargo.toml +++ b/testutil/Cargo.toml @@ -16,6 +16,9 @@ cargo_metadata = "0.18.0" # Pin to 0.1.5 because more recent versions require a Rust version more recent # than our MSRV. cargo-platform = "=0.1.5" +# Pin to 2.5.0 because more recent versions require a Rust version more recent +# than our MSRV. +memchr = "=2.5.0" parking_lot = "=0.12.1" rustc_version = "0.4.0" # Pin to 0.3.0 because more recent versions require a Rust version more recent diff --git a/zerocopy-derive/tests/ui-nightly/derive_transparent.stderr b/zerocopy-derive/tests/ui-nightly/derive_transparent.stderr index 285adba595..822cc3860b 100644 --- a/zerocopy-derive/tests/ui-nightly/derive_transparent.stderr +++ b/zerocopy-derive/tests/ui-nightly/derive_transparent.stderr @@ -12,7 +12,7 @@ error[E0277]: the trait bound `NotZerocopy: TryFromBytes` is not satisfied AtomicBool AtomicI16 AtomicI32 - AtomicI8 + AtomicI64 and $N others note: required for `TransparentStruct` to implement `TryFromBytes` --> tests/ui-nightly/derive_transparent.rs:24:21 @@ -40,7 +40,7 @@ error[E0277]: the trait bound `NotZerocopy: FromZeros` is not satisfied AtomicBool AtomicI16 AtomicI32 - AtomicI8 + AtomicI64 and $N others note: required for `TransparentStruct` to implement `FromZeros` --> tests/ui-nightly/derive_transparent.rs:24:21 @@ -65,10 +65,10 @@ error[E0277]: the trait bound `NotZerocopy: zerocopy::FromBytes` is not satisfie AU16 AtomicI16 AtomicI32 + AtomicI64 AtomicI8 AtomicIsize AtomicU16 - AtomicU32 and $N others note: required for `TransparentStruct` to implement `zerocopy::FromBytes` --> tests/ui-nightly/derive_transparent.rs:24:21 @@ -94,9 +94,9 @@ error[E0277]: the trait bound `NotZerocopy: zerocopy::IntoBytes` is not satisfie AtomicBool AtomicI16 AtomicI32 + AtomicI64 AtomicI8 AtomicIsize - AtomicU16 and $N others note: required for `TransparentStruct` to implement `zerocopy::IntoBytes` --> tests/ui-nightly/derive_transparent.rs:24:10 diff --git a/zerocopy-derive/tests/ui-nightly/late_compile_pass.stderr b/zerocopy-derive/tests/ui-nightly/late_compile_pass.stderr index 0e9444faae..fbfc567600 100644 --- a/zerocopy-derive/tests/ui-nightly/late_compile_pass.stderr +++ b/zerocopy-derive/tests/ui-nightly/late_compile_pass.stderr @@ -20,7 +20,7 @@ error[E0277]: the trait bound `NotZerocopy: TryFromBytes` is not satisfied AtomicBool AtomicI16 AtomicI32 - AtomicI8 + AtomicI64 and $N others = help: see issue #48214 = note: this error originates in the derive macro `TryFromBytes` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -43,7 +43,7 @@ error[E0277]: the trait bound `NotZerocopy: TryFromBytes` is not satisfied AtomicBool AtomicI16 AtomicI32 - AtomicI8 + AtomicI64 and $N others = help: see issue #48214 = note: this error originates in the derive macro `FromZeros` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -66,7 +66,7 @@ error[E0277]: the trait bound `NotZerocopy: FromZeros` is not satisfied AtomicBool AtomicI16 AtomicI32 - AtomicI8 + AtomicI64 and $N others = help: see issue #48214 = note: this error originates in the derive macro `FromZeros` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -89,7 +89,7 @@ error[E0277]: the trait bound `NotZerocopy: TryFromBytes` is not satisfied AtomicBool AtomicI16 AtomicI32 - AtomicI8 + AtomicI64 and $N others = help: see issue #48214 = note: this error originates in the derive macro `FromBytes` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -112,7 +112,7 @@ error[E0277]: the trait bound `NotZerocopy: FromZeros` is not satisfied AtomicBool AtomicI16 AtomicI32 - AtomicI8 + AtomicI64 and $N others = help: see issue #48214 = note: this error originates in the derive macro `FromBytes` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -132,10 +132,10 @@ error[E0277]: the trait bound `NotZerocopy: zerocopy::FromBytes` is not satisfie AU16 AtomicI16 AtomicI32 + AtomicI64 AtomicI8 AtomicIsize AtomicU16 - AtomicU32 and $N others = help: see issue #48214 = note: this error originates in the derive macro `FromBytes` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -156,9 +156,9 @@ error[E0277]: the trait bound `NotZerocopy: zerocopy::IntoBytes` is not satisfie AtomicBool AtomicI16 AtomicI32 + AtomicI64 AtomicI8 AtomicIsize - AtomicU16 and $N others = help: see issue #48214 = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/zerocopy-derive/tests/ui-nightly/struct.stderr b/zerocopy-derive/tests/ui-nightly/struct.stderr index 59b855a5c4..93c802c273 100644 --- a/zerocopy-derive/tests/ui-nightly/struct.stderr +++ b/zerocopy-derive/tests/ui-nightly/struct.stderr @@ -86,7 +86,7 @@ error[E0277]: the trait bound `NotKnownLayoutDst: zerocopy::KnownLayout` is not AtomicBool AtomicI16 AtomicI32 - AtomicI8 + AtomicI64 and $N others = help: see issue #48214 = note: this error originates in the derive macro `KnownLayout` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -109,7 +109,7 @@ error[E0277]: the trait bound `NotKnownLayout: zerocopy::KnownLayout` is not sat AtomicBool AtomicI16 AtomicI32 - AtomicI8 + AtomicI64 and $N others = help: see issue #48214 = note: this error originates in the derive macro `KnownLayout` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/zerocopy-derive/tests/ui-stable/derive_transparent.stderr b/zerocopy-derive/tests/ui-stable/derive_transparent.stderr index eb6a8a88cc..ce092a4a52 100644 --- a/zerocopy-derive/tests/ui-stable/derive_transparent.stderr +++ b/zerocopy-derive/tests/ui-stable/derive_transparent.stderr @@ -12,7 +12,7 @@ error[E0277]: the trait bound `NotZerocopy: TryFromBytes` is not satisfied AtomicBool AtomicI16 AtomicI32 - AtomicI8 + AtomicI64 and $N others note: required for `TransparentStruct` to implement `TryFromBytes` --> tests/ui-stable/derive_transparent.rs:24:21 @@ -40,7 +40,7 @@ error[E0277]: the trait bound `NotZerocopy: FromZeros` is not satisfied AtomicBool AtomicI16 AtomicI32 - AtomicI8 + AtomicI64 and $N others note: required for `TransparentStruct` to implement `FromZeros` --> tests/ui-stable/derive_transparent.rs:24:21 @@ -65,10 +65,10 @@ error[E0277]: the trait bound `NotZerocopy: zerocopy::FromBytes` is not satisfie AU16 AtomicI16 AtomicI32 + AtomicI64 AtomicI8 AtomicIsize AtomicU16 - AtomicU32 and $N others note: required for `TransparentStruct` to implement `zerocopy::FromBytes` --> tests/ui-stable/derive_transparent.rs:24:21 @@ -94,9 +94,9 @@ error[E0277]: the trait bound `NotZerocopy: zerocopy::IntoBytes` is not satisfie AtomicBool AtomicI16 AtomicI32 + AtomicI64 AtomicI8 AtomicIsize - AtomicU16 and $N others note: required for `TransparentStruct` to implement `zerocopy::IntoBytes` --> tests/ui-stable/derive_transparent.rs:24:10 diff --git a/zerocopy-derive/tests/ui-stable/late_compile_pass.stderr b/zerocopy-derive/tests/ui-stable/late_compile_pass.stderr index 5b566ede7d..2eb1555680 100644 --- a/zerocopy-derive/tests/ui-stable/late_compile_pass.stderr +++ b/zerocopy-derive/tests/ui-stable/late_compile_pass.stderr @@ -20,7 +20,7 @@ error[E0277]: the trait bound `NotZerocopy: TryFromBytes` is not satisfied AtomicBool AtomicI16 AtomicI32 - AtomicI8 + AtomicI64 and $N others = help: see issue #48214 = note: this error originates in the derive macro `TryFromBytes` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -39,7 +39,7 @@ error[E0277]: the trait bound `NotZerocopy: TryFromBytes` is not satisfied AtomicBool AtomicI16 AtomicI32 - AtomicI8 + AtomicI64 and $N others = help: see issue #48214 = note: this error originates in the derive macro `FromZeros` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -58,7 +58,7 @@ error[E0277]: the trait bound `NotZerocopy: FromZeros` is not satisfied AtomicBool AtomicI16 AtomicI32 - AtomicI8 + AtomicI64 and $N others = help: see issue #48214 = note: this error originates in the derive macro `FromZeros` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -77,7 +77,7 @@ error[E0277]: the trait bound `NotZerocopy: TryFromBytes` is not satisfied AtomicBool AtomicI16 AtomicI32 - AtomicI8 + AtomicI64 and $N others = help: see issue #48214 = note: this error originates in the derive macro `FromBytes` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -96,7 +96,7 @@ error[E0277]: the trait bound `NotZerocopy: FromZeros` is not satisfied AtomicBool AtomicI16 AtomicI32 - AtomicI8 + AtomicI64 and $N others = help: see issue #48214 = note: this error originates in the derive macro `FromBytes` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -112,10 +112,10 @@ error[E0277]: the trait bound `NotZerocopy: zerocopy::FromBytes` is not satisfie AU16 AtomicI16 AtomicI32 + AtomicI64 AtomicI8 AtomicIsize AtomicU16 - AtomicU32 and $N others = help: see issue #48214 = note: this error originates in the derive macro `FromBytes` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -132,9 +132,9 @@ error[E0277]: the trait bound `NotZerocopy: zerocopy::IntoBytes` is not satisfie AtomicBool AtomicI16 AtomicI32 + AtomicI64 AtomicI8 AtomicIsize - AtomicU16 and $N others = help: see issue #48214 = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/zerocopy-derive/tests/ui-stable/struct.stderr b/zerocopy-derive/tests/ui-stable/struct.stderr index c718ea7d77..913c20c998 100644 --- a/zerocopy-derive/tests/ui-stable/struct.stderr +++ b/zerocopy-derive/tests/ui-stable/struct.stderr @@ -78,7 +78,7 @@ error[E0277]: the trait bound `NotKnownLayoutDst: zerocopy::KnownLayout` is not AtomicBool AtomicI16 AtomicI32 - AtomicI8 + AtomicI64 and $N others = help: see issue #48214 = note: this error originates in the derive macro `KnownLayout` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -97,7 +97,7 @@ error[E0277]: the trait bound `NotKnownLayout: zerocopy::KnownLayout` is not sat AtomicBool AtomicI16 AtomicI32 - AtomicI8 + AtomicI64 and $N others = help: see issue #48214 = note: this error originates in the derive macro `KnownLayout` (in Nightly builds, run with -Z macro-backtrace for more info)