From df533509ea9de00bf26cc47aae16aac4ae6adc61 Mon Sep 17 00:00:00 2001 From: Joshua Liebow-Feeser Date: Fri, 9 Aug 2024 14:23:49 -0700 Subject: [PATCH] Detect atomic support using target_has_atomic Implements `TryFromBytes` and `FromZeros` for `AtomicPtr`; `FromBytes` and `IntoBytes` are blocked by #170. This is adapted from @josephlr's similar implementation in #1092. Fixes #1086 Co-authored-by: Joe Richey --- .github/workflows/ci.yml | 17 ++- Cargo.toml | 4 + src/impls.rs | 120 ++++++++++++------ src/lib.rs | 11 +- .../include_value_not_from_bytes.stderr | 12 +- .../transmute-dst-not-frombytes.stderr | 12 +- .../transmute-mut-dst-not-frombytes.stderr | 14 +- .../transmute-mut-dst-not-intobytes.stderr | 14 +- .../transmute-mut-src-not-frombytes.stderr | 28 ++-- .../transmute-mut-src-not-intobytes.stderr | 28 ++-- .../transmute-ref-dst-not-frombytes.stderr | 12 +- .../transmute-ref-src-not-intobytes.stderr | 24 ++-- .../transmute-src-not-intobytes.stderr | 24 ++-- .../try_transmute-dst-not-tryfrombytes.stderr | 24 ++-- .../try_transmute-src-not-intobytes.stderr | 12 +- .../include_value_not_from_bytes.stderr | 12 +- .../transmute-dst-not-frombytes.stderr | 12 +- .../transmute-mut-dst-not-frombytes.stderr | 14 +- .../transmute-mut-dst-not-intobytes.stderr | 14 +- .../transmute-mut-src-not-frombytes.stderr | 28 ++-- .../transmute-mut-src-not-intobytes.stderr | 28 ++-- .../transmute-ref-dst-not-frombytes.stderr | 12 +- .../transmute-ref-src-not-intobytes.stderr | 24 ++-- .../transmute-src-not-intobytes.stderr | 24 ++-- .../try_transmute-dst-not-tryfrombytes.stderr | 24 ++-- .../try_transmute-src-not-intobytes.stderr | 12 +- .../ui-nightly/derive_transparent.stderr | 46 +++---- .../tests/ui-nightly/late_compile_pass.stderr | 82 ++++++------ .../tests/ui-nightly/struct.stderr | 10 +- .../tests/ui-stable/derive_transparent.stderr | 46 +++---- .../tests/ui-stable/late_compile_pass.stderr | 82 ++++++------ zerocopy-derive/tests/ui-stable/struct.stderr | 10 +- 32 files changed, 445 insertions(+), 391 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f5945401491..6fe53b7bb43 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,7 +46,19 @@ jobs: matrix: # See `INTERNAL.md` for an explanation of these pinned toolchain # versions. - toolchain: [ "msrv", "stable", "nightly", "zerocopy-generic-bounds-in-const-fn", "zerocopy-aarch64-simd", "zerocopy-panic-in-const", ] + toolchain: [ + "msrv", + "stable", + "nightly", + + # These are the names of specific Rust versions detected in + # `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" + ] target: [ "i686-unknown-linux-gnu", "x86_64-unknown-linux-gnu", @@ -57,6 +69,7 @@ jobs: "riscv64gc-unknown-linux-gnu", "s390x-unknown-linux-gnu", "x86_64-pc-windows-msvc", + "thumbv6m-none-eabi", "wasm32-wasi" ] features: [ "--no-default-features", "", "--features __internal_use_only_features_that_work_on_stable", "--all-features" ] @@ -109,6 +122,8 @@ jobs: event_name: "pull_request" - target: "s390x-unknown-linux-gnu" event_name: "pull_request" + - target: "thumbv6m-none-eabi" + event_name: "pull_request" - target: "wasm32-wasi" event_name: "pull_request" diff --git a/Cargo.toml b/Cargo.toml index 0f6c354c4eb..0d1dd6770f5 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 19337107238..abe49326606 100644 --- a/src/impls.rs +++ b/src/impls.rs @@ -440,49 +440,91 @@ 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(zerocopy_target_has_atomics)] +mod atomics { + use core::sync::atomic::{ + AtomicBool, AtomicI16, AtomicI32, AtomicI64, AtomicI8, AtomicIsize, AtomicPtr, AtomicU16, + AtomicU32, AtomicU64, AtomicU8, AtomicUsize, }; -} -#[rustfmt::skip] -impl_traits_for_atomics!( - AtomicI16, AtomicI32, AtomicI8, AtomicIsize, - AtomicU16, AtomicU32, AtomicU8, AtomicUsize, -); + use super::*; -impl_for_transparent_wrapper!(=> TryFromBytes for AtomicBool); -impl_for_transparent_wrapper!(=> FromZeros for AtomicBool); -impl_for_transparent_wrapper!(=> IntoBytes for AtomicBool); + 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); + )* + }; + } -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 = "8")] + #[cfg_attr(doc_cfg, doc(cfg(target_has_atomic = "8")))] + mod atomic_8 { + 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); + } + } + + #[cfg(target_has_atomic = "16")] + #[cfg_attr(doc_cfg, doc(cfg(target_has_atomic = "16")))] + impl_traits_for_atomics!(AtomicU16, AtomicI16); + + #[cfg(target_has_atomic = "32")] + #[cfg_attr(doc_cfg, doc(cfg(target_has_atomic = "32")))] + impl_traits_for_atomics!(AtomicU32, AtomicI32); + + #[cfg(target_has_atomic = "64")] + #[cfg_attr(doc_cfg, doc(cfg(target_has_atomic = "64")))] + impl_traits_for_atomics!(AtomicU64, AtomicI64); + + #[cfg(target_has_atomic = "ptr")] + #[cfg_attr(doc_cfg, doc(cfg(target_has_atomic = "ptr")))] + mod atomic_ptr { + 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! { diff --git a/src/lib.rs b/src/lib.rs index 4dfe7705ee9..9890fb5aae2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -337,10 +337,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 +815,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 +824,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/tests/ui-nightly/include_value_not_from_bytes.stderr b/tests/ui-nightly/include_value_not_from_bytes.stderr index bc67ccb38bd..9e18610701f 100644 --- a/tests/ui-nightly/include_value_not_from_bytes.stderr +++ b/tests/ui-nightly/include_value_not_from_bytes.stderr @@ -10,12 +10,12 @@ error[E0277]: the trait bound `NotZerocopy: zerocopy::FromBytes` is not sat = help: the following other types implement trait `zerocopy::FromBytes`: () AU16 - AtomicI16 - AtomicI32 - AtomicI8 - AtomicIsize - AtomicU16 - AtomicU32 + F32 + F64 + I128 + I16 + I32 + I64 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 1edc54b919c..233b2c7b4f1 100644 --- a/tests/ui-nightly/transmute-dst-not-frombytes.stderr +++ b/tests/ui-nightly/transmute-dst-not-frombytes.stderr @@ -10,12 +10,12 @@ error[E0277]: the trait bound `NotZerocopy: zerocopy::FromBytes` is not satisfie = help: the following other types implement trait `zerocopy::FromBytes`: () AU16 - AtomicI16 - AtomicI32 - AtomicI8 - AtomicIsize - AtomicU16 - AtomicU32 + F32 + F64 + I128 + I16 + I32 + I64 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 94bec562c95..f9b8b5edf4c 100644 --- a/tests/ui-nightly/transmute-mut-dst-not-frombytes.stderr +++ b/tests/ui-nightly/transmute-mut-dst-not-frombytes.stderr @@ -9,13 +9,13 @@ error[E0277]: the trait bound `Dst: FromBytes` is not satisfied | = help: the following other types implement trait `FromBytes`: () - AtomicI16 - AtomicI32 - AtomicI8 - AtomicIsize - AtomicU16 - AtomicU32 - AtomicU8 + F32 + F64 + I128 + I16 + I32 + I64 + Isize 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 49991c14ffb..fa3c63c49e3 100644 --- a/tests/ui-nightly/transmute-mut-dst-not-intobytes.stderr +++ b/tests/ui-nightly/transmute-mut-dst-not-intobytes.stderr @@ -9,13 +9,13 @@ error[E0277]: the trait bound `Dst: IntoBytes` is not satisfied | = help: the following other types implement trait `IntoBytes`: () - AtomicBool - AtomicI16 - AtomicI32 - AtomicI8 - AtomicIsize - AtomicU16 - AtomicU32 + F32 + F64 + I128 + I16 + I32 + I64 + Isize 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 912e7bd2a27..858fc50951d 100644 --- a/tests/ui-nightly/transmute-mut-src-not-frombytes.stderr +++ b/tests/ui-nightly/transmute-mut-src-not-frombytes.stderr @@ -9,13 +9,13 @@ error[E0277]: the trait bound `Src: FromBytes` is not satisfied | = help: the following other types implement trait `FromBytes`: () - AtomicI16 - AtomicI32 - AtomicI8 - AtomicIsize - AtomicU16 - AtomicU32 - AtomicU8 + Dst + F32 + F64 + I128 + I16 + I32 + I64 and $N others note: required by a bound in `AssertSrcIsFromBytes` --> tests/ui-nightly/transmute-mut-src-not-frombytes.rs:24:38 @@ -32,13 +32,13 @@ error[E0277]: the trait bound `Src: FromBytes` is not satisfied | = help: the following other types implement trait `FromBytes`: () - AtomicI16 - AtomicI32 - AtomicI8 - AtomicIsize - AtomicU16 - AtomicU32 - AtomicU8 + Dst + F32 + F64 + I128 + I16 + I32 + I64 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 5907bad4991..22faafd68c6 100644 --- a/tests/ui-nightly/transmute-mut-src-not-intobytes.stderr +++ b/tests/ui-nightly/transmute-mut-src-not-intobytes.stderr @@ -9,13 +9,13 @@ error[E0277]: the trait bound `Src: IntoBytes` is not satisfied | = help: the following other types implement trait `IntoBytes`: () - AtomicBool - AtomicI16 - AtomicI32 - AtomicI8 - AtomicIsize - AtomicU16 - AtomicU32 + Dst + F32 + F64 + I128 + I16 + I32 + I64 and $N others note: required by a bound in `AssertSrcIsIntoBytes` --> tests/ui-nightly/transmute-mut-src-not-intobytes.rs:24:36 @@ -32,13 +32,13 @@ error[E0277]: the trait bound `Src: IntoBytes` is not satisfied | = help: the following other types implement trait `IntoBytes`: () - AtomicBool - AtomicI16 - AtomicI32 - AtomicI8 - AtomicIsize - AtomicU16 - AtomicU32 + Dst + F32 + F64 + I128 + I16 + I32 + I64 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 f52f711f74f..2bf1186f7d0 100644 --- a/tests/ui-nightly/transmute-ref-dst-not-frombytes.stderr +++ b/tests/ui-nightly/transmute-ref-dst-not-frombytes.stderr @@ -10,12 +10,12 @@ error[E0277]: the trait bound `Dst: zerocopy::FromBytes` is not satisfied = help: the following other types implement trait `zerocopy::FromBytes`: () AU16 - AtomicI16 - AtomicI32 - AtomicI8 - AtomicIsize - AtomicU16 - AtomicU32 + F32 + F64 + I128 + I16 + I32 + I64 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 8cac27acc32..6387bd5e09d 100644 --- a/tests/ui-nightly/transmute-ref-src-not-intobytes.stderr +++ b/tests/ui-nightly/transmute-ref-src-not-intobytes.stderr @@ -10,12 +10,12 @@ error[E0277]: the trait bound `Src: zerocopy::IntoBytes` is not satisfied = help: the following other types implement trait `zerocopy::IntoBytes`: () AU16 - AtomicBool - AtomicI16 - AtomicI32 - AtomicI8 - AtomicIsize - AtomicU16 + F32 + F64 + I128 + I16 + I32 + I64 and $N others note: required by a bound in `AssertSrcIsIntoBytes` --> tests/ui-nightly/transmute-ref-src-not-intobytes.rs:23:33 @@ -33,12 +33,12 @@ error[E0277]: the trait bound `Src: zerocopy::IntoBytes` is not satisfied = help: the following other types implement trait `zerocopy::IntoBytes`: () AU16 - AtomicBool - AtomicI16 - AtomicI32 - AtomicI8 - AtomicIsize - AtomicU16 + F32 + F64 + I128 + I16 + I32 + I64 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 110a8e7583d..9a5702fb9d0 100644 --- a/tests/ui-nightly/transmute-src-not-intobytes.stderr +++ b/tests/ui-nightly/transmute-src-not-intobytes.stderr @@ -10,12 +10,12 @@ error[E0277]: the trait bound `NotZerocopy: zerocopy::IntoBytes` is not sa = help: the following other types implement trait `zerocopy::IntoBytes`: () AU16 - AtomicBool - AtomicI16 - AtomicI32 - AtomicI8 - AtomicIsize - AtomicU16 + F32 + F64 + I128 + I16 + I32 + I64 and $N others note: required by a bound in `AssertIsIntoBytes` --> tests/ui-nightly/transmute-src-not-intobytes.rs:19:32 @@ -33,12 +33,12 @@ error[E0277]: the trait bound `NotZerocopy: zerocopy::IntoBytes` is not sa = help: the following other types implement trait `zerocopy::IntoBytes`: () AU16 - AtomicBool - AtomicI16 - AtomicI32 - AtomicI8 - AtomicIsize - AtomicU16 + F32 + F64 + I128 + I16 + I32 + I64 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 f15626848cf..975f2518f11 100644 --- a/tests/ui-nightly/try_transmute-dst-not-tryfrombytes.stderr +++ b/tests/ui-nightly/try_transmute-dst-not-tryfrombytes.stderr @@ -9,10 +9,10 @@ error[E0277]: the trait bound `NotZerocopy: TryFromBytes` is not satisfied *const T *mut T AU16 - AtomicBool - AtomicI16 - AtomicI32 - AtomicI8 + F32 + F64 + I128 + I16 and $N others note: required by a bound in `ValidityError` --> src/error.rs @@ -31,10 +31,10 @@ error[E0277]: the trait bound `NotZerocopy: TryFromBytes` is not satisfied *const T *mut T AU16 - AtomicBool - AtomicI16 - AtomicI32 - AtomicI8 + F32 + F64 + I128 + I16 and $N others note: required by a bound in `try_transmute` --> src/macro_util.rs @@ -57,10 +57,10 @@ error[E0277]: the trait bound `NotZerocopy: TryFromBytes` is not satisfied *const T *mut T AU16 - AtomicBool - AtomicI16 - AtomicI32 - AtomicI8 + F32 + F64 + I128 + I16 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 aef2978b846..4f4e18bb6ff 100644 --- a/tests/ui-nightly/try_transmute-src-not-intobytes.stderr +++ b/tests/ui-nightly/try_transmute-src-not-intobytes.stderr @@ -7,12 +7,12 @@ error[E0277]: the trait bound `NotZerocopy: zerocopy::IntoBytes` is not sa = help: the following other types implement trait `zerocopy::IntoBytes`: () AU16 - AtomicBool - AtomicI16 - AtomicI32 - AtomicI8 - AtomicIsize - AtomicU16 + F32 + F64 + I128 + I16 + I32 + I64 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 611c1a88585..0b364ab6947 100644 --- a/tests/ui-stable/include_value_not_from_bytes.stderr +++ b/tests/ui-stable/include_value_not_from_bytes.stderr @@ -10,12 +10,12 @@ error[E0277]: the trait bound `NotZerocopy: zerocopy::FromBytes` is not sat = help: the following other types implement trait `zerocopy::FromBytes`: () AU16 - AtomicI16 - AtomicI32 - AtomicI8 - AtomicIsize - AtomicU16 - AtomicU32 + F32 + F64 + I128 + I16 + I32 + I64 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 b3408a0f48e..09bc64a66b5 100644 --- a/tests/ui-stable/transmute-dst-not-frombytes.stderr +++ b/tests/ui-stable/transmute-dst-not-frombytes.stderr @@ -10,12 +10,12 @@ error[E0277]: the trait bound `NotZerocopy: zerocopy::FromBytes` is not satisfie = help: the following other types implement trait `zerocopy::FromBytes`: () AU16 - AtomicI16 - AtomicI32 - AtomicI8 - AtomicIsize - AtomicU16 - AtomicU32 + F32 + F64 + I128 + I16 + I32 + I64 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 e1647870a89..2d3f588e5e3 100644 --- a/tests/ui-stable/transmute-mut-dst-not-frombytes.stderr +++ b/tests/ui-stable/transmute-mut-dst-not-frombytes.stderr @@ -9,13 +9,13 @@ error[E0277]: the trait bound `Dst: FromBytes` is not satisfied | = help: the following other types implement trait `FromBytes`: () - AtomicI16 - AtomicI32 - AtomicI8 - AtomicIsize - AtomicU16 - AtomicU32 - AtomicU8 + F32 + F64 + I128 + I16 + I32 + I64 + Isize 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 78cf5ffc0fb..781979b8416 100644 --- a/tests/ui-stable/transmute-mut-dst-not-intobytes.stderr +++ b/tests/ui-stable/transmute-mut-dst-not-intobytes.stderr @@ -9,13 +9,13 @@ error[E0277]: the trait bound `Dst: IntoBytes` is not satisfied | = help: the following other types implement trait `IntoBytes`: () - AtomicBool - AtomicI16 - AtomicI32 - AtomicI8 - AtomicIsize - AtomicU16 - AtomicU32 + F32 + F64 + I128 + I16 + I32 + I64 + Isize 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 951bf82c88c..6a21ff15060 100644 --- a/tests/ui-stable/transmute-mut-src-not-frombytes.stderr +++ b/tests/ui-stable/transmute-mut-src-not-frombytes.stderr @@ -9,13 +9,13 @@ error[E0277]: the trait bound `Src: FromBytes` is not satisfied | = help: the following other types implement trait `FromBytes`: () - AtomicI16 - AtomicI32 - AtomicI8 - AtomicIsize - AtomicU16 - AtomicU32 - AtomicU8 + Dst + F32 + F64 + I128 + I16 + I32 + I64 and $N others note: required by a bound in `AssertSrcIsFromBytes` --> tests/ui-stable/transmute-mut-src-not-frombytes.rs:24:38 @@ -32,13 +32,13 @@ error[E0277]: the trait bound `Src: FromBytes` is not satisfied | = help: the following other types implement trait `FromBytes`: () - AtomicI16 - AtomicI32 - AtomicI8 - AtomicIsize - AtomicU16 - AtomicU32 - AtomicU8 + Dst + F32 + F64 + I128 + I16 + I32 + I64 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 fb1a31f314a..a0da309b706 100644 --- a/tests/ui-stable/transmute-mut-src-not-intobytes.stderr +++ b/tests/ui-stable/transmute-mut-src-not-intobytes.stderr @@ -9,13 +9,13 @@ error[E0277]: the trait bound `Src: IntoBytes` is not satisfied | = help: the following other types implement trait `IntoBytes`: () - AtomicBool - AtomicI16 - AtomicI32 - AtomicI8 - AtomicIsize - AtomicU16 - AtomicU32 + Dst + F32 + F64 + I128 + I16 + I32 + I64 and $N others note: required by a bound in `AssertSrcIsIntoBytes` --> tests/ui-stable/transmute-mut-src-not-intobytes.rs:24:36 @@ -32,13 +32,13 @@ error[E0277]: the trait bound `Src: IntoBytes` is not satisfied | = help: the following other types implement trait `IntoBytes`: () - AtomicBool - AtomicI16 - AtomicI32 - AtomicI8 - AtomicIsize - AtomicU16 - AtomicU32 + Dst + F32 + F64 + I128 + I16 + I32 + I64 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 24067665a27..548b6db386e 100644 --- a/tests/ui-stable/transmute-ref-dst-not-frombytes.stderr +++ b/tests/ui-stable/transmute-ref-dst-not-frombytes.stderr @@ -10,12 +10,12 @@ error[E0277]: the trait bound `Dst: zerocopy::FromBytes` is not satisfied = help: the following other types implement trait `zerocopy::FromBytes`: () AU16 - AtomicI16 - AtomicI32 - AtomicI8 - AtomicIsize - AtomicU16 - AtomicU32 + F32 + F64 + I128 + I16 + I32 + I64 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 27fe6210d31..04cbc7231ce 100644 --- a/tests/ui-stable/transmute-ref-src-not-intobytes.stderr +++ b/tests/ui-stable/transmute-ref-src-not-intobytes.stderr @@ -10,12 +10,12 @@ error[E0277]: the trait bound `Src: zerocopy::IntoBytes` is not satisfied = help: the following other types implement trait `zerocopy::IntoBytes`: () AU16 - AtomicBool - AtomicI16 - AtomicI32 - AtomicI8 - AtomicIsize - AtomicU16 + F32 + F64 + I128 + I16 + I32 + I64 and $N others note: required by a bound in `AssertSrcIsIntoBytes` --> tests/ui-stable/transmute-ref-src-not-intobytes.rs:23:33 @@ -33,12 +33,12 @@ error[E0277]: the trait bound `Src: zerocopy::IntoBytes` is not satisfied = help: the following other types implement trait `zerocopy::IntoBytes`: () AU16 - AtomicBool - AtomicI16 - AtomicI32 - AtomicI8 - AtomicIsize - AtomicU16 + F32 + F64 + I128 + I16 + I32 + I64 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 9f8c1508f74..0d39b0a227b 100644 --- a/tests/ui-stable/transmute-src-not-intobytes.stderr +++ b/tests/ui-stable/transmute-src-not-intobytes.stderr @@ -10,12 +10,12 @@ error[E0277]: the trait bound `NotZerocopy: zerocopy::IntoBytes` is not sa = help: the following other types implement trait `zerocopy::IntoBytes`: () AU16 - AtomicBool - AtomicI16 - AtomicI32 - AtomicI8 - AtomicIsize - AtomicU16 + F32 + F64 + I128 + I16 + I32 + I64 and $N others note: required by a bound in `AssertIsIntoBytes` --> tests/ui-stable/transmute-src-not-intobytes.rs:19:32 @@ -33,12 +33,12 @@ error[E0277]: the trait bound `NotZerocopy: zerocopy::IntoBytes` is not sa = help: the following other types implement trait `zerocopy::IntoBytes`: () AU16 - AtomicBool - AtomicI16 - AtomicI32 - AtomicI8 - AtomicIsize - AtomicU16 + F32 + F64 + I128 + I16 + I32 + I64 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 fa3772a1be3..de4d146ddcd 100644 --- a/tests/ui-stable/try_transmute-dst-not-tryfrombytes.stderr +++ b/tests/ui-stable/try_transmute-dst-not-tryfrombytes.stderr @@ -9,10 +9,10 @@ error[E0277]: the trait bound `NotZerocopy: TryFromBytes` is not satisfied *const T *mut T AU16 - AtomicBool - AtomicI16 - AtomicI32 - AtomicI8 + F32 + F64 + I128 + I16 and $N others note: required by a bound in `ValidityError` --> src/error.rs @@ -31,10 +31,10 @@ error[E0277]: the trait bound `NotZerocopy: TryFromBytes` is not satisfied *const T *mut T AU16 - AtomicBool - AtomicI16 - AtomicI32 - AtomicI8 + F32 + F64 + I128 + I16 and $N others note: required by a bound in `try_transmute` --> src/macro_util.rs @@ -57,10 +57,10 @@ error[E0277]: the trait bound `NotZerocopy: TryFromBytes` is not satisfied *const T *mut T AU16 - AtomicBool - AtomicI16 - AtomicI32 - AtomicI8 + F32 + F64 + I128 + I16 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 0ba29b075ff..adf96ae74e7 100644 --- a/tests/ui-stable/try_transmute-src-not-intobytes.stderr +++ b/tests/ui-stable/try_transmute-src-not-intobytes.stderr @@ -7,12 +7,12 @@ error[E0277]: the trait bound `NotZerocopy: zerocopy::IntoBytes` is not sa = help: the following other types implement trait `zerocopy::IntoBytes`: () AU16 - AtomicBool - AtomicI16 - AtomicI32 - AtomicI8 - AtomicIsize - AtomicU16 + F32 + F64 + I128 + I16 + I32 + I64 and $N others note: required by a bound in `try_transmute` --> src/macro_util.rs diff --git a/zerocopy-derive/tests/ui-nightly/derive_transparent.stderr b/zerocopy-derive/tests/ui-nightly/derive_transparent.stderr index 285adba595f..79f3e9bfc4e 100644 --- a/zerocopy-derive/tests/ui-nightly/derive_transparent.stderr +++ b/zerocopy-derive/tests/ui-nightly/derive_transparent.stderr @@ -9,10 +9,10 @@ error[E0277]: the trait bound `NotZerocopy: TryFromBytes` is not satisfied *const T *mut T AU16 - AtomicBool - AtomicI16 - AtomicI32 - AtomicI8 + F32 + F64 + I128 + I16 and $N others note: required for `TransparentStruct` to implement `TryFromBytes` --> tests/ui-nightly/derive_transparent.rs:24:21 @@ -37,10 +37,10 @@ error[E0277]: the trait bound `NotZerocopy: FromZeros` is not satisfied *const T *mut T AU16 - AtomicBool - AtomicI16 - AtomicI32 - AtomicI8 + F32 + F64 + I128 + I16 and $N others note: required for `TransparentStruct` to implement `FromZeros` --> tests/ui-nightly/derive_transparent.rs:24:21 @@ -63,12 +63,12 @@ error[E0277]: the trait bound `NotZerocopy: zerocopy::FromBytes` is not satisfie = help: the following other types implement trait `zerocopy::FromBytes`: () AU16 - AtomicI16 - AtomicI32 - AtomicI8 - AtomicIsize - AtomicU16 - AtomicU32 + F32 + F64 + I128 + I16 + I32 + I64 and $N others note: required for `TransparentStruct` to implement `zerocopy::FromBytes` --> tests/ui-nightly/derive_transparent.rs:24:21 @@ -91,12 +91,12 @@ error[E0277]: the trait bound `NotZerocopy: zerocopy::IntoBytes` is not satisfie = help: the following other types implement trait `zerocopy::IntoBytes`: () AU16 - AtomicBool - AtomicI16 - AtomicI32 - AtomicI8 - AtomicIsize - AtomicU16 + F32 + F64 + I128 + I16 + I32 + I64 and $N others note: required for `TransparentStruct` to implement `zerocopy::IntoBytes` --> tests/ui-nightly/derive_transparent.rs:24:10 @@ -118,13 +118,13 @@ error[E0277]: the trait bound `NotZerocopy: Unaligned` is not satisfied | = help: the following other types implement trait `Unaligned`: () - AtomicBool - AtomicI8 - AtomicU8 F32 F64 I128 I16 + I32 + I64 + Isize and $N others note: required for `TransparentStruct` to implement `Unaligned` --> tests/ui-nightly/derive_transparent.rs:24:32 diff --git a/zerocopy-derive/tests/ui-nightly/late_compile_pass.stderr b/zerocopy-derive/tests/ui-nightly/late_compile_pass.stderr index 0e9444faaea..d753ccccd60 100644 --- a/zerocopy-derive/tests/ui-nightly/late_compile_pass.stderr +++ b/zerocopy-derive/tests/ui-nightly/late_compile_pass.stderr @@ -17,10 +17,10 @@ error[E0277]: the trait bound `NotZerocopy: TryFromBytes` is not satisfied *const T *mut T AU16 - AtomicBool - AtomicI16 - AtomicI32 - AtomicI8 + F32 + F64 + FromBytes1 + FromZeros1 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) @@ -40,10 +40,10 @@ error[E0277]: the trait bound `NotZerocopy: TryFromBytes` is not satisfied *const T *mut T AU16 - AtomicBool - AtomicI16 - AtomicI32 - AtomicI8 + F32 + F64 + FromBytes1 + FromZeros1 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) @@ -63,10 +63,10 @@ error[E0277]: the trait bound `NotZerocopy: FromZeros` is not satisfied *const T *mut T AU16 - AtomicBool - AtomicI16 - AtomicI32 - AtomicI8 + F32 + F64 + FromBytes1 + FromZeros1 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) @@ -86,10 +86,10 @@ error[E0277]: the trait bound `NotZerocopy: TryFromBytes` is not satisfied *const T *mut T AU16 - AtomicBool - AtomicI16 - AtomicI32 - AtomicI8 + F32 + F64 + FromBytes1 + FromZeros1 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) @@ -109,10 +109,10 @@ error[E0277]: the trait bound `NotZerocopy: FromZeros` is not satisfied *const T *mut T AU16 - AtomicBool - AtomicI16 - AtomicI32 - AtomicI8 + F32 + F64 + FromBytes1 + FromZeros1 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) @@ -130,12 +130,12 @@ error[E0277]: the trait bound `NotZerocopy: zerocopy::FromBytes` is not satisfie = help: the following other types implement trait `zerocopy::FromBytes`: () AU16 - AtomicI16 - AtomicI32 - AtomicI8 - AtomicIsize - AtomicU16 - AtomicU32 + F32 + F64 + FromBytes1 + I128 + I16 + I32 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) @@ -153,12 +153,12 @@ error[E0277]: the trait bound `NotZerocopy: zerocopy::IntoBytes` is not satisfie = help: the following other types implement trait `zerocopy::IntoBytes`: () AU16 - AtomicBool - AtomicI16 - AtomicI32 - AtomicI8 - AtomicIsize - AtomicU16 + F32 + F64 + I128 + I16 + I32 + I64 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) @@ -175,13 +175,13 @@ error[E0277]: the trait bound `AU16: Unaligned` is not satisfied | = help: the following other types implement trait `Unaligned`: () - AtomicBool - AtomicI8 - AtomicU8 F32 F64 I128 I16 + I32 + I64 + Isize and $N others = help: see issue #48214 = note: this error originates in the derive macro `Unaligned` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -198,13 +198,13 @@ error[E0277]: the trait bound `AU16: Unaligned` is not satisfied | = help: the following other types implement trait `Unaligned`: () - AtomicBool - AtomicI8 - AtomicU8 F32 F64 I128 I16 + I32 + I64 + Isize and $N others = help: see issue #48214 = note: this error originates in the derive macro `Unaligned` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -221,13 +221,13 @@ error[E0277]: the trait bound `AU16: Unaligned` is not satisfied | = help: the following other types implement trait `Unaligned`: () - AtomicBool - AtomicI8 - AtomicU8 F32 F64 I128 I16 + I32 + I64 + Isize and $N others = help: see issue #48214 = note: this error originates in the derive macro `Unaligned` (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 59b855a5c42..692999fb3f0 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) @@ -221,13 +221,13 @@ error[E0277]: the trait bound `AU16: Unaligned` is not satisfied | = help: the following other types implement trait `Unaligned`: () - AtomicBool - AtomicI8 - AtomicU8 F32 F64 I128 I16 + I32 + I64 + Isize 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/derive_transparent.stderr b/zerocopy-derive/tests/ui-stable/derive_transparent.stderr index eb6a8a88cc0..c14431a3528 100644 --- a/zerocopy-derive/tests/ui-stable/derive_transparent.stderr +++ b/zerocopy-derive/tests/ui-stable/derive_transparent.stderr @@ -9,10 +9,10 @@ error[E0277]: the trait bound `NotZerocopy: TryFromBytes` is not satisfied *const T *mut T AU16 - AtomicBool - AtomicI16 - AtomicI32 - AtomicI8 + F32 + F64 + I128 + I16 and $N others note: required for `TransparentStruct` to implement `TryFromBytes` --> tests/ui-stable/derive_transparent.rs:24:21 @@ -37,10 +37,10 @@ error[E0277]: the trait bound `NotZerocopy: FromZeros` is not satisfied *const T *mut T AU16 - AtomicBool - AtomicI16 - AtomicI32 - AtomicI8 + F32 + F64 + I128 + I16 and $N others note: required for `TransparentStruct` to implement `FromZeros` --> tests/ui-stable/derive_transparent.rs:24:21 @@ -63,12 +63,12 @@ error[E0277]: the trait bound `NotZerocopy: zerocopy::FromBytes` is not satisfie = help: the following other types implement trait `zerocopy::FromBytes`: () AU16 - AtomicI16 - AtomicI32 - AtomicI8 - AtomicIsize - AtomicU16 - AtomicU32 + F32 + F64 + I128 + I16 + I32 + I64 and $N others note: required for `TransparentStruct` to implement `zerocopy::FromBytes` --> tests/ui-stable/derive_transparent.rs:24:21 @@ -91,12 +91,12 @@ error[E0277]: the trait bound `NotZerocopy: zerocopy::IntoBytes` is not satisfie = help: the following other types implement trait `zerocopy::IntoBytes`: () AU16 - AtomicBool - AtomicI16 - AtomicI32 - AtomicI8 - AtomicIsize - AtomicU16 + F32 + F64 + I128 + I16 + I32 + I64 and $N others note: required for `TransparentStruct` to implement `zerocopy::IntoBytes` --> tests/ui-stable/derive_transparent.rs:24:10 @@ -118,13 +118,13 @@ error[E0277]: the trait bound `NotZerocopy: Unaligned` is not satisfied | = help: the following other types implement trait `Unaligned`: () - AtomicBool - AtomicI8 - AtomicU8 F32 F64 I128 I16 + I32 + I64 + Isize and $N others note: required for `TransparentStruct` to implement `Unaligned` --> tests/ui-stable/derive_transparent.rs:24:32 diff --git a/zerocopy-derive/tests/ui-stable/late_compile_pass.stderr b/zerocopy-derive/tests/ui-stable/late_compile_pass.stderr index 5b566ede7d4..d57bcbbdc18 100644 --- a/zerocopy-derive/tests/ui-stable/late_compile_pass.stderr +++ b/zerocopy-derive/tests/ui-stable/late_compile_pass.stderr @@ -17,10 +17,10 @@ error[E0277]: the trait bound `NotZerocopy: TryFromBytes` is not satisfied *const T *mut T AU16 - AtomicBool - AtomicI16 - AtomicI32 - AtomicI8 + F32 + F64 + FromBytes1 + FromZeros1 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) @@ -36,10 +36,10 @@ error[E0277]: the trait bound `NotZerocopy: TryFromBytes` is not satisfied *const T *mut T AU16 - AtomicBool - AtomicI16 - AtomicI32 - AtomicI8 + F32 + F64 + FromBytes1 + FromZeros1 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) @@ -55,10 +55,10 @@ error[E0277]: the trait bound `NotZerocopy: FromZeros` is not satisfied *const T *mut T AU16 - AtomicBool - AtomicI16 - AtomicI32 - AtomicI8 + F32 + F64 + FromBytes1 + FromZeros1 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) @@ -74,10 +74,10 @@ error[E0277]: the trait bound `NotZerocopy: TryFromBytes` is not satisfied *const T *mut T AU16 - AtomicBool - AtomicI16 - AtomicI32 - AtomicI8 + F32 + F64 + FromBytes1 + FromZeros1 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) @@ -93,10 +93,10 @@ error[E0277]: the trait bound `NotZerocopy: FromZeros` is not satisfied *const T *mut T AU16 - AtomicBool - AtomicI16 - AtomicI32 - AtomicI8 + F32 + F64 + FromBytes1 + FromZeros1 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) @@ -110,12 +110,12 @@ error[E0277]: the trait bound `NotZerocopy: zerocopy::FromBytes` is not satisfie = help: the following other types implement trait `zerocopy::FromBytes`: () AU16 - AtomicI16 - AtomicI32 - AtomicI8 - AtomicIsize - AtomicU16 - AtomicU32 + F32 + F64 + FromBytes1 + I128 + I16 + I32 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) @@ -129,12 +129,12 @@ error[E0277]: the trait bound `NotZerocopy: zerocopy::IntoBytes` is not satisfie = help: the following other types implement trait `zerocopy::IntoBytes`: () AU16 - AtomicBool - AtomicI16 - AtomicI32 - AtomicI8 - AtomicIsize - AtomicU16 + F32 + F64 + I128 + I16 + I32 + I64 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) @@ -147,13 +147,13 @@ error[E0277]: the trait bound `AU16: Unaligned` is not satisfied | = help: the following other types implement trait `Unaligned`: () - AtomicBool - AtomicI8 - AtomicU8 F32 F64 I128 I16 + I32 + I64 + Isize and $N others = help: see issue #48214 = note: this error originates in the derive macro `Unaligned` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -166,13 +166,13 @@ error[E0277]: the trait bound `AU16: Unaligned` is not satisfied | = help: the following other types implement trait `Unaligned`: () - AtomicBool - AtomicI8 - AtomicU8 F32 F64 I128 I16 + I32 + I64 + Isize and $N others = help: see issue #48214 = note: this error originates in the derive macro `Unaligned` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -185,13 +185,13 @@ error[E0277]: the trait bound `AU16: Unaligned` is not satisfied | = help: the following other types implement trait `Unaligned`: () - AtomicBool - AtomicI8 - AtomicU8 F32 F64 I128 I16 + I32 + I64 + Isize and $N others = help: see issue #48214 = note: this error originates in the derive macro `Unaligned` (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 c718ea7d77f..de35912e709 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) @@ -197,13 +197,13 @@ error[E0277]: the trait bound `AU16: Unaligned` is not satisfied | = help: the following other types implement trait `Unaligned`: () - AtomicBool - AtomicI8 - AtomicU8 F32 F64 I128 I16 + I32 + I64 + Isize 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)