From e0c3da245d884a5ecb58418ac159ca324f296b98 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 This is adapted from @josephlr's similar implementation in #1091. Fixes #1086 Co-authored-by: Joe Richey --- .github/workflows/ci.yml | 17 ++- Cargo.toml | 4 + src/impls.rs | 103 +++++++++++------- src/lib.rs | 9 +- .../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, 430 insertions(+), 387 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f594540149..6fe53b7bb4 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 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..23576d26b1 100644 --- a/src/impls.rs +++ b/src/impls.rs @@ -440,49 +440,72 @@ 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 super::*; -#[rustfmt::skip] -impl_traits_for_atomics!( - AtomicI16, AtomicI32, AtomicI8, AtomicIsize, - AtomicU16, AtomicU32, AtomicU8, AtomicUsize, -); + 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); + )* + }; + } -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 super::*; + + impl_traits_for_atomics!(AtomicU8, AtomicI8); + + 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_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")))] + impl_traits_for_atomics!(AtomicUsize, AtomicIsize); } safety_comment! { diff --git a/src/lib.rs b/src/lib.rs index 4dfe7705ee..a5fad3ecdc 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -338,8 +338,8 @@ use core::{ ptr::{self, NonNull}, slice, sync::atomic::{ - AtomicBool, AtomicI16, AtomicI32, AtomicI8, AtomicIsize, AtomicPtr, AtomicU16, AtomicU32, - AtomicU8, AtomicUsize, + AtomicBool, AtomicI16, AtomicI32, AtomicI64, AtomicI8, AtomicIsize, AtomicPtr, AtomicU16, + AtomicU32, AtomicU64, AtomicU8, AtomicUsize, }, }; @@ -820,8 +820,9 @@ impl_known_layout!( bool, char, NonZeroU8, NonZeroI8, NonZeroU16, NonZeroI16, NonZeroU32, NonZeroI32, NonZeroU64, NonZeroI64, NonZeroU128, NonZeroI128, NonZeroUsize, NonZeroIsize, - AtomicBool, AtomicI16, AtomicI32, AtomicI8, AtomicIsize, AtomicU16, AtomicU32, - AtomicU8, AtomicUsize + AtomicBool, + AtomicU8, AtomicU16, AtomicU32, AtomicU64, AtomicUsize, + AtomicI8, AtomicI16, AtomicI32, AtomicI64, AtomicIsize ); #[rustfmt::skip] impl_known_layout!( diff --git a/tests/ui-nightly/include_value_not_from_bytes.stderr b/tests/ui-nightly/include_value_not_from_bytes.stderr index bc67ccb38b..9e18610701 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 1edc54b919..233b2c7b4f 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 94bec562c9..f9b8b5edf4 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 49991c14ff..fa3c63c49e 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 912e7bd2a2..858fc50951 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 5907bad499..22faafd68c 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 f52f711f74..2bf1186f7d 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 8cac27acc3..6387bd5e09 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 110a8e7583..9a5702fb9d 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 f15626848c..975f2518f1 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 aef2978b84..4f4e18bb6f 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 611c1a8858..0b364ab694 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 b3408a0f48..09bc64a66b 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 e1647870a8..2d3f588e5e 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 78cf5ffc0f..781979b841 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 951bf82c88..6a21ff1506 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 fb1a31f314..a0da309b70 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 24067665a2..548b6db386 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 27fe6210d3..04cbc7231c 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 9f8c1508f7..0d39b0a227 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 fa3772a1be..de4d146ddc 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 0ba29b075f..adf96ae74e 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 285adba595..79f3e9bfc4 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 0e9444faae..d753ccccd6 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 59b855a5c4..692999fb3f 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 eb6a8a88cc..c14431a352 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 5b566ede7d..d57bcbbdc1 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 c718ea7d77..de35912e70 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)