diff --git a/src/byte_slice.rs b/src/byte_slice.rs index 6f9ee9ac33..28680fcdbb 100644 --- a/src/byte_slice.rs +++ b/src/byte_slice.rs @@ -22,7 +22,7 @@ use core::{ // // See the documentation on `util::polyfills` for more information. #[allow(unused_imports)] -use crate::util::polyfills::{self, NonNullExt as _, NumExt as _}; +use crate::util::polyfills::{self, NumExt as _}; #[cfg(doc)] use crate::Ref; diff --git a/src/byteorder.rs b/src/byteorder.rs index be81aa8674..aef94a2a3d 100644 --- a/src/byteorder.rs +++ b/src/byteorder.rs @@ -1280,9 +1280,7 @@ mod tests { fn test_const_methods() { use big_endian::*; - #[rustversion::since(1.61.0)] const _U: U16 = U16::new(0); - #[rustversion::since(1.61.0)] const _NATIVE: u16 = _U.get(); const _FROM_BYTES: U16 = U16::from_bytes([0, 1]); const _BYTES: [u8; 2] = _FROM_BYTES.to_bytes(); diff --git a/src/layout.rs b/src/layout.rs index 72de754cb0..bf8774dbef 100644 --- a/src/layout.rs +++ b/src/layout.rs @@ -102,7 +102,7 @@ impl DstLayout { /// The minimum possible alignment of a type. const MIN_ALIGN: NonZeroUsize = match NonZeroUsize::new(1) { Some(min_align) => min_align, - None => const_unreachable!(), + None => unreachable!(), }; /// The maximum theoretic possible alignment of a type. @@ -113,7 +113,7 @@ impl DstLayout { pub(crate) const THEORETICAL_MAX_ALIGN: NonZeroUsize = match NonZeroUsize::new(1 << (POINTER_WIDTH_BITS - 1)) { Some(max_align) => max_align, - None => const_unreachable!(), + None => unreachable!(), }; /// The current, documented max alignment of a type \[1\]. @@ -126,14 +126,14 @@ impl DstLayout { #[cfg(not(target_pointer_width = "16"))] pub(crate) const CURRENT_MAX_ALIGN: NonZeroUsize = match NonZeroUsize::new(1 << 28) { Some(max_align) => max_align, - None => const_unreachable!(), + None => unreachable!(), }; #[cfg(not(kani))] #[cfg(target_pointer_width = "16")] pub(crate) const CURRENT_MAX_ALIGN: NonZeroUsize = match NonZeroUsize::new(1 << 15) { Some(max_align) => max_align, - None => const_unreachable!(), + None => unreachable!(), }; /// The maximum size of an allocation \[1\]. @@ -184,7 +184,7 @@ impl DstLayout { None => Self::MIN_ALIGN, }; - const_assert!(align.get().is_power_of_two()); + assert!(align.get().is_power_of_two()); DstLayout { align, @@ -210,7 +210,7 @@ impl DstLayout { DstLayout { align: match NonZeroUsize::new(mem::align_of::()) { Some(align) => align, - None => const_unreachable!(), + None => unreachable!(), }, size_info: SizeInfo::Sized { size: mem::size_of::() }, statically_shallow_unpadded: false, @@ -247,7 +247,7 @@ impl DstLayout { DstLayout { align: match NonZeroUsize::new(mem::align_of::()) { Some(align) => align, - None => const_unreachable!(), + None => unreachable!(), }, size_info: SizeInfo::SliceDst(TrailingSliceLayout { offset: 0, @@ -344,17 +344,17 @@ impl DstLayout { None => Self::THEORETICAL_MAX_ALIGN, }; - const_assert!(max_align.get().is_power_of_two()); + assert!(max_align.get().is_power_of_two()); // We use Kani to prove that this method is robust to future increases // in Rust's maximum allowed alignment. However, if such a change ever // actually occurs, we'd like to be notified via assertion failures. #[cfg(not(kani))] { - const_debug_assert!(self.align.get() <= DstLayout::CURRENT_MAX_ALIGN.get()); - const_debug_assert!(field.align.get() <= DstLayout::CURRENT_MAX_ALIGN.get()); + debug_assert!(self.align.get() <= DstLayout::CURRENT_MAX_ALIGN.get()); + debug_assert!(field.align.get() <= DstLayout::CURRENT_MAX_ALIGN.get()); if let Some(repr_packed) = repr_packed { - const_debug_assert!(repr_packed.get() <= DstLayout::CURRENT_MAX_ALIGN.get()); + debug_assert!(repr_packed.get() <= DstLayout::CURRENT_MAX_ALIGN.get()); } } @@ -375,7 +375,7 @@ impl DstLayout { let (interfield_padding, size_info) = match self.size_info { // If the layout is already a DST, we panic; DSTs cannot be extended // with additional fields. - SizeInfo::SliceDst(..) => const_panic!("Cannot extend a DST with additional fields."), + SizeInfo::SliceDst(..) => panic!("Cannot extend a DST with additional fields."), SizeInfo::Sized { size: preceding_size } => { // Compute the minimum amount of inter-field padding needed to @@ -396,7 +396,7 @@ impl DstLayout { // exceeding `isize::MAX`). let offset = match preceding_size.checked_add(padding) { Some(offset) => offset, - None => const_panic!("Adding padding to `self`'s size overflows `usize`."), + None => panic!("Adding padding to `self`'s size overflows `usize`."), }; ( @@ -416,7 +416,7 @@ impl DstLayout { // `usize::MAX`). let size = match offset.checked_add(field_size) { Some(size) => size, - None => const_panic!("`field` cannot be appended without the total size overflowing `usize`"), + None => panic!("`field` cannot be appended without the total size overflowing `usize`"), }; SizeInfo::Sized { size } } @@ -438,7 +438,7 @@ impl DstLayout { // `usize::MAX`). let offset = match offset.checked_add(trailing_offset) { Some(offset) => offset, - None => const_panic!("`field` cannot be appended without the total size overflowing `usize`"), + None => panic!("`field` cannot be appended without the total size overflowing `usize`"), }; SizeInfo::SliceDst(TrailingSliceLayout { offset, elem_size }) } @@ -495,7 +495,7 @@ impl DstLayout { let padding = padding_needed_for(unpadded_size, self.align); let size = match unpadded_size.checked_add(padding) { Some(size) => size, - None => const_panic!("Adding padding caused size to overflow `usize`."), + None => panic!("Adding padding caused size to overflow `usize`."), }; (padding, SizeInfo::Sized { size }) } @@ -611,7 +611,7 @@ impl DstLayout { // `debug_assert!`, but with `#[allow(clippy::arithmetic_side_effects)]`. macro_rules! __const_debug_assert { ($e:expr $(, $msg:expr)?) => { - const_debug_assert!({ + debug_assert!({ #[allow(clippy::arithmetic_side_effects)] let e = $e; e @@ -626,11 +626,8 @@ impl DstLayout { // would have failed anyway for runtime reasons (such as a too-small // memory region). // - // FIXME(#67): Once our MSRV is 1.65, use let-else: - // https://blog.rust-lang.org/2022/11/03/Rust-1.65.0.html#let-else-statements - let size_info = match self.size_info.try_to_nonzero_elem_size() { - Some(size_info) => size_info, - None => const_panic!("attempted to cast to slice type with zero-sized element"), + let Some(size_info) = self.size_info.try_to_nonzero_elem_size() else { + panic!("attempted to cast to slice type with zero-sized element") }; // Precondition @@ -685,13 +682,9 @@ impl DstLayout { util::round_down_to_next_multiple_of_alignment(bytes_len, self.align); // Calculate the maximum number of bytes that could be consumed // by the trailing slice. - // - // FIXME(#67): Once our MSRV is 1.65, use let-else: - // https://blog.rust-lang.org/2022/11/03/Rust-1.65.0.html#let-else-statements - let max_slice_and_padding_bytes = match max_total_bytes.checked_sub(offset) { - Some(max) => max, + let Some(max_slice_and_padding_bytes) = max_total_bytes.checked_sub(offset) else { // `bytes_len` too small even for 0 trailing slice elements. - None => return Err(MetadataCastError::Size), + return Err(MetadataCastError::Size); }; // Calculate the number of elements that fit in @@ -1070,7 +1063,7 @@ mod cast_from { const CAST_PARAMS: CastParams = match CastParams::try_compute(&Src::LAYOUT, &Dst::LAYOUT) { Some(params) => params, - None => const_panic!( + None => panic!( "cannot `transmute_ref!` or `transmute_mut!` between incompatible types" ), }; @@ -1091,11 +1084,6 @@ mod cast_from { } } -// FIXME(#67): For some reason, on our MSRV toolchain, this `allow` isn't -// enforced despite having `#![allow(unknown_lints)]` at the crate root, but -// putting it here works. Once our MSRV is high enough that this bug has been -// fixed, remove this `allow`. -#[allow(unknown_lints)] #[cfg(test)] mod tests { use super::*; @@ -1364,7 +1352,7 @@ mod tests { /// call to `validate_cast_and_convert_metadata` panics with the given /// panic message or, if the current Rust toolchain version is too /// early to support panicking in `const fn`s, panics with *some* - /// message. In the latter case, the `const_panic!` macro is used, + /// message. In the latter case, the `panic!` macro is used, /// which emits code which causes a non-panicking error at const eval /// time, but which does panic when invoked at runtime. Thus, it is /// merely difficult to predict the *value* of this panic. We deem diff --git a/src/lib.rs b/src/lib.rs index 6bcaf6ac30..899591dfc4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -419,7 +419,7 @@ pub use crate::pointer::{invariant::BecauseImmutable, Maybe, Ptr}; // // See the documentation on `util::polyfills` for more information. #[allow(unused_imports)] -use crate::util::polyfills::{self, NonNullExt as _, NumExt as _}; +use crate::util::polyfills::{self, NumExt as _}; #[cfg(all(test, not(__ZEROCOPY_INTERNAL_USE_ONLY_DEV_MODE)))] const _: () = { @@ -890,7 +890,7 @@ where T: KnownLayout, { const SIZE_INFO: TrailingSliceLayout = match T::LAYOUT.size_info { - crate::SizeInfo::Sized { .. } => const_panic!("unreachable"), + crate::SizeInfo::Sized { .. } => panic!("unreachable"), crate::SizeInfo::SliceDst(info) => info, }; } @@ -920,7 +920,7 @@ where CastType::Prefix, ) { Ok((elems, _)) => elems, - Err(_) => const_panic!("unreachable"), + Err(_) => panic!("unreachable"), }, }; } @@ -1056,8 +1056,6 @@ unsafe impl KnownLayout for [T] { // refers to an object with `elems` elements by construction. #[inline(always)] fn raw_from_ptr_len(data: NonNull, elems: usize) -> NonNull { - // FIXME(#67): Remove this allow. See NonNullExt for more details. - #[allow(unstable_name_collisions)] NonNull::slice_from_raw_parts(data.cast::(), elems) } @@ -1332,14 +1330,12 @@ where } } }; - const_assert!(is_infallible); + assert!(is_infallible); is_infallible }; } - const_assert!( - as IsInfallible>::IS_INFALLIBLE - ); + assert!( as IsInfallible>::IS_INFALLIBLE); Ok(()) } diff --git a/src/pointer/ptr.rs b/src/pointer/ptr.rs index 30e7a7080f..f975ae99ea 100644 --- a/src/pointer/ptr.rs +++ b/src/pointer/ptr.rs @@ -102,7 +102,6 @@ mod def { } } -#[allow(unreachable_pub)] // This is a false positive on our MSRV toolchain. pub use def::Ptr; /// External trait implementations on [`Ptr`]. @@ -1503,10 +1502,10 @@ mod tests { } test!(ZstDst, 8, 0, Some(0)); - test!(ZstDst, 7, 0, None); + test!(ZstDst, 7, 0, None::); test!(ZstDst, 8, usize::MAX, Some(usize::MAX)); - test!(ZstDst, 7, usize::MAX, None); + test!(ZstDst, 7, usize::MAX, None::); #[derive(KnownLayout, Immutable)] #[repr(C)] @@ -1516,15 +1515,15 @@ mod tests { } test!(Dst, 8, 0, Some(0)); - test!(Dst, 7, 0, None); + test!(Dst, 7, 0, None::); test!(Dst, 9, 1, Some(1)); - test!(Dst, 8, 1, None); + test!(Dst, 8, 1, None::); // If we didn't properly check for overflow, this would cause the // metadata to overflow to 0, and thus the cast would spuriously // succeed. - test!(Dst, 8, usize::MAX - 8 + 1, None); + test!(Dst, 8, usize::MAX - 8 + 1, None::); } #[test] diff --git a/src/ref.rs b/src/ref.rs index 496afc435c..b2b6e7c0ef 100644 --- a/src/ref.rs +++ b/src/ref.rs @@ -192,7 +192,6 @@ mod def { impl Copy for Ref {} } -#[allow(unreachable_pub)] // This is a false positive on our MSRV toolchain. pub use def::Ref; use crate::pointer::{ diff --git a/src/util/macro_util.rs b/src/util/macro_util.rs index d2d48772c9..e429059b62 100644 --- a/src/util/macro_util.rs +++ b/src/util/macro_util.rs @@ -109,11 +109,7 @@ pub const ALIGNED_64K_ALLOCATION: NonNull<[u8]> = { // // FIXME(#429): Once `NonNull::new_unchecked` docs document that it // preserves provenance, cite those docs. - // FIXME: Replace this `as` with `ptr.cast_mut()` once our MSRV >= 1.65 - #[allow(clippy::as_conversions)] - unsafe { - NonNull::new_unchecked(ptr as *mut _) - } + unsafe { NonNull::new_unchecked(ptr.cast_mut()) } }; /// Computes the offset of the base of the field `$trailing_field_name` within @@ -729,12 +725,7 @@ impl<'a, Src, Dst> Wrap<&'a Src, &'a Dst> { // - We know that the returned lifetime will not outlive the input // lifetime thanks to the lifetime bounds on this function. // - // FIXME(#67): Once our MSRV is 1.58, replace this `transmute` with - // `&*dst`. - #[allow(clippy::transmute_ptr_to_ref)] - unsafe { - mem::transmute(dst) - } + unsafe { &*dst } } #[inline(always)] diff --git a/src/util/macros.rs b/src/util/macros.rs index e25e62c3ae..65f27c969a 100644 --- a/src/util/macros.rs +++ b/src/util/macros.rs @@ -532,11 +532,7 @@ macro_rules! unsafe_impl_known_layout { macro_rules! assert_unaligned { ($($tys:ty),*) => { $( - // We only compile this assertion under `cfg(test)` to avoid taking - // an extra non-dev dependency (and making this crate more expensive - // to compile for our dependents). - #[cfg(test)] - static_assertions::const_assert_eq!(core::mem::align_of::<$tys>(), 1); + const _: () = assert!(core::mem::align_of::<$tys>() == 1); )* }; } @@ -553,54 +549,6 @@ macro_rules! maybe_const_trait_bounded_fn { }; } -/// Either panic (if the current Rust toolchain supports panicking in `const -/// fn`) or evaluate a constant that will cause an array indexing error whose -/// error message will include the format string. -/// -/// The type that this expression evaluates to must be `Copy`, or else the -/// non-panicking desugaring will fail to compile. -macro_rules! const_panic { - (@non_panic $($_arg:tt)+) => {{ - // This will type check to whatever type is expected based on the call - // site. - let panic: [_; 0] = []; - // This will always fail (since we're indexing into an array of size 0. - #[allow(unconditional_panic)] - panic[0] - }}; - ($($arg:tt)+) => {{ - panic!($($arg)+); - }}; -} - -/// Either assert (if the current Rust toolchain supports panicking in `const -/// fn`) or evaluate the expression and, if it evaluates to `false`, call -/// `const_panic!`. This is used in place of `assert!` in const contexts to -/// accommodate old toolchains. -macro_rules! const_assert { - ($e:expr) => {{ - assert!($e); - }}; - ($e:expr, $($args:tt)+) => {{ - assert!($e, $($args)+); - }}; -} - -/// Like `const_assert!`, but relative to `debug_assert!`. -macro_rules! const_debug_assert { - ($e:expr $(, $msg:expr)?) => {{ - debug_assert!($e $(, $msg)?); - }} -} - -/// Either invoke `unreachable!()` or `loop {}` depending on whether the Rust -/// toolchain supports panicking in `const fn`. -macro_rules! const_unreachable { - () => {{ - unreachable!(); - }}; -} - /// Asserts at compile time that `$condition` is true for `Self` or the given /// `$tyvar`s. Unlike `const_assert`, this is *strictly* a compile-time check; /// it cannot be evaluated in a runtime context. The condition is checked after @@ -613,12 +561,12 @@ macro_rules! static_assert { impl StaticAssert for T { const ASSERT: bool = { - const_assert!($condition $(, $args)*); + assert!($condition $(, $args)*); $condition }; } - const_assert!(::ASSERT); + assert!(::ASSERT); }}; ($($tyvar:ident $(: $(? $optbound:ident $(+)?)* $($bound:ident $(+)?)* )?),* => $condition:expr $(, $args:tt)*) => {{ trait StaticAssert { @@ -628,12 +576,12 @@ macro_rules! static_assert { // NOTE: We use `PhantomData` so we can support unsized types. impl<$($tyvar $(: $(? $optbound +)* $($bound +)*)?,)*> StaticAssert for ($(core::marker::PhantomData<$tyvar>,)*) { const ASSERT: bool = { - const_assert!($condition $(, $args)*); + assert!($condition $(, $args)*); $condition }; } - const_assert!(<($(core::marker::PhantomData<$tyvar>,)*) as StaticAssert>::ASSERT); + assert!(<($(core::marker::PhantomData<$tyvar>,)*) as StaticAssert>::ASSERT); }}; } diff --git a/src/util/mod.rs b/src/util/mod.rs index 817c9e594c..7f4257c0b9 100644 --- a/src/util/mod.rs +++ b/src/util/mod.rs @@ -667,37 +667,6 @@ pub(crate) use len_of::MetadataOf; /// Each trait is imported as `_` at the crate root; each polyfill should "just /// work" at usage sites. pub(crate) mod polyfills { - use core::ptr::{self, NonNull}; - - // A polyfill for `NonNull::slice_from_raw_parts` that we can use before our - // MSRV is 1.70, when that function was stabilized. - // - // The `#[allow(unused)]` is necessary because, on sufficiently recent - // toolchain versions, `ptr.slice_from_raw_parts()` resolves to the inherent - // method rather than to this trait, and so this trait is considered unused. - // - // FIXME(#67): Once our MSRV is 1.70, remove this. - #[allow(unused)] - pub(crate) trait NonNullExt { - fn slice_from_raw_parts(data: Self, len: usize) -> NonNull<[T]>; - } - - impl NonNullExt for NonNull { - // NOTE on coverage: this will never be tested in nightly since it's a - // polyfill for a feature which has been stabilized on our nightly - // toolchain. - #[cfg_attr( - all(coverage_nightly, __ZEROCOPY_INTERNAL_USE_ONLY_NIGHTLY_FEATURES_IN_TESTS), - coverage(off) - )] - #[inline(always)] - fn slice_from_raw_parts(data: Self, len: usize) -> NonNull<[T]> { - let ptr = ptr::slice_from_raw_parts_mut(data.as_ptr(), len); - // SAFETY: `ptr` is converted from `data`, which is non-null. - unsafe { NonNull::new_unchecked(ptr) } - } - } - // A polyfill for `Self::unchecked_sub` that we can use until methods like // `usize::unchecked_sub` is stabilized. // @@ -890,7 +859,6 @@ mod tests { } } - #[rustversion::since(1.57.0)] #[test] #[should_panic] fn test_round_down_to_next_multiple_of_alignment_zerocopy_panic_in_const_and_vec_try_reserve() { diff --git a/src/wrappers.rs b/src/wrappers.rs index f3930eb7eb..e85dfbd0bf 100644 --- a/src/wrappers.rs +++ b/src/wrappers.rs @@ -240,11 +240,7 @@ impl Unalign { // but the caller has promised that `self` is properly aligned, so we // know that it is sound to create a reference to `T` at this memory // location. - // - // We use `mem::transmute` instead of `&*self.get_ptr()` because - // dereferencing pointers is not stable in `const` on our current MSRV - // (1.56 as of this writing). - unsafe { mem::transmute(self) } + unsafe { &*self.get_ptr() } } /// Returns a mutable reference to the wrapped `T` without checking @@ -598,7 +594,6 @@ impl fmt::Debug for MaybeUninit { } } -#[allow(unreachable_pub)] // False positive on MSRV #[doc(hidden)] pub use read_only_def::*; mod read_only_def { @@ -904,7 +899,7 @@ mod tests { let au64 = unsafe { x.t.deref_unchecked() }; match au64 { AU64(123) => {} - _ => const_unreachable!(), + _ => unreachable!(), } }; } diff --git a/tests/ui/transmute_mut.msrv.stderr b/tests/ui/transmute_mut.msrv.stderr index 6b7d2a0250..3de25e1be0 100644 --- a/tests/ui/transmute_mut.msrv.stderr +++ b/tests/ui/transmute_mut.msrv.stderr @@ -36,12 +36,12 @@ error[E0277]: the trait bound `DstA: FromBytes` is not satisfied u8 and 85 others note: required by a bound in `Wrap::<&'a mut Src, &'a mut Dst>::transmute_mut` - --> $WORKSPACE/src/util/macro_util.rs:801:14 + --> $WORKSPACE/src/util/macro_util.rs:792:14 | -798 | pub fn transmute_mut(self) -> &'a mut Dst +789 | pub fn transmute_mut(self) -> &'a mut Dst | ------------- required by a bound in this associated function ... -801 | Dst: FromBytes + IntoBytes, +792 | Dst: FromBytes + IntoBytes, | ^^^^^^^^^ required by this bound in `Wrap::<&mut Src, &mut Dst>::transmute_mut` = note: this error originates in the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -63,12 +63,12 @@ error[E0277]: the trait bound `DstB: IntoBytes` is not satisfied i128 and 74 others note: required by a bound in `Wrap::<&'a mut Src, &'a mut Dst>::transmute_mut` - --> $WORKSPACE/src/util/macro_util.rs:801:26 + --> $WORKSPACE/src/util/macro_util.rs:792:26 | -798 | pub fn transmute_mut(self) -> &'a mut Dst +789 | pub fn transmute_mut(self) -> &'a mut Dst | ------------- required by a bound in this associated function ... -801 | Dst: FromBytes + IntoBytes, +792 | Dst: FromBytes + IntoBytes, | ^^^^^^^^^ required by this bound in `Wrap::<&mut Src, &mut Dst>::transmute_mut` = note: this error originates in the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -122,12 +122,12 @@ error[E0277]: the trait bound `SrcC: FromBytes` is not satisfied u8 and 85 others note: required by a bound in `Wrap::<&'a mut Src, &'a mut Dst>::transmute_mut` - --> $WORKSPACE/src/util/macro_util.rs:800:14 + --> $WORKSPACE/src/util/macro_util.rs:791:14 | -798 | pub fn transmute_mut(self) -> &'a mut Dst +789 | pub fn transmute_mut(self) -> &'a mut Dst | ------------- required by a bound in this associated function -799 | where -800 | Src: FromBytes + IntoBytes, +790 | where +791 | Src: FromBytes + IntoBytes, | ^^^^^^^^^ required by this bound in `Wrap::<&mut Src, &mut Dst>::transmute_mut` = note: this error originates in the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -149,12 +149,12 @@ error[E0277]: the trait bound `SrcD: IntoBytes` is not satisfied i128 and 74 others note: required by a bound in `Wrap::<&'a mut Src, &'a mut Dst>::transmute_mut` - --> $WORKSPACE/src/util/macro_util.rs:800:26 + --> $WORKSPACE/src/util/macro_util.rs:791:26 | -798 | pub fn transmute_mut(self) -> &'a mut Dst +789 | pub fn transmute_mut(self) -> &'a mut Dst | ------------- required by a bound in this associated function -799 | where -800 | Src: FromBytes + IntoBytes, +790 | where +791 | Src: FromBytes + IntoBytes, | ^^^^^^^^^ required by this bound in `Wrap::<&mut Src, &mut Dst>::transmute_mut` = note: this error originates in the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -164,9 +164,9 @@ error[E0599]: the method `transmute_mut` exists for struct `Wrap<&mut [u8], &mut 87 | const SRC_UNSIZED: &mut [u8; 1] = transmute_mut!(&mut [0u8][..]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - ::: $WORKSPACE/src/util/macro_util.rs:681:1 + ::: $WORKSPACE/src/util/macro_util.rs:677:1 | -681 | pub struct Wrap(pub Src, pub PhantomData); +677 | pub struct Wrap(pub Src, pub PhantomData); | ------------------------- doesn't satisfy `Wrap<&mut [u8], &mut [u8; 1]>: TransmuteMutDst<'_>` | = note: the following trait bounds were not satisfied: diff --git a/tests/ui/transmute_mut.nightly.stderr b/tests/ui/transmute_mut.nightly.stderr index de1aa43eef..a977a9d8f4 100644 --- a/tests/ui/transmute_mut.nightly.stderr +++ b/tests/ui/transmute_mut.nightly.stderr @@ -41,12 +41,12 @@ help: the trait `FromBytes` is not implemented for `DstA` (A, B, C, D, E, F, G, H) and 85 others note: required by a bound in `zerocopy::util::macro_util::Wrap::<&'a mut Src, &'a mut Dst>::transmute_mut` - --> src/util/macro_util.rs:801:14 + --> src/util/macro_util.rs:792:14 | -798 | pub fn transmute_mut(self) -> &'a mut Dst +789 | pub fn transmute_mut(self) -> &'a mut Dst | ------------- required by a bound in this associated function ... -801 | Dst: FromBytes + IntoBytes, +792 | Dst: FromBytes + IntoBytes, | ^^^^^^^^^ required by this bound in `Wrap::<&mut Src, &mut Dst>::transmute_mut` = note: this error originates in the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -73,12 +73,12 @@ help: the trait `IntoBytes` is not implemented for `DstB` AtomicIsize and 74 others note: required by a bound in `zerocopy::util::macro_util::Wrap::<&'a mut Src, &'a mut Dst>::transmute_mut` - --> src/util/macro_util.rs:801:26 + --> src/util/macro_util.rs:792:26 | -798 | pub fn transmute_mut(self) -> &'a mut Dst +789 | pub fn transmute_mut(self) -> &'a mut Dst | ------------- required by a bound in this associated function ... -801 | Dst: FromBytes + IntoBytes, +792 | Dst: FromBytes + IntoBytes, | ^^^^^^^^^ required by this bound in `Wrap::<&mut Src, &mut Dst>::transmute_mut` = note: this error originates in the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -149,12 +149,12 @@ help: the trait `FromBytes` is not implemented for `SrcC` (A, B, C, D, E, F, G, H) and 85 others note: required by a bound in `zerocopy::util::macro_util::Wrap::<&'a mut Src, &'a mut Dst>::transmute_mut` - --> src/util/macro_util.rs:800:14 + --> src/util/macro_util.rs:791:14 | -798 | pub fn transmute_mut(self) -> &'a mut Dst +789 | pub fn transmute_mut(self) -> &'a mut Dst | ------------- required by a bound in this associated function -799 | where -800 | Src: FromBytes + IntoBytes, +790 | where +791 | Src: FromBytes + IntoBytes, | ^^^^^^^^^ required by this bound in `Wrap::<&mut Src, &mut Dst>::transmute_mut` = note: this error originates in the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -181,12 +181,12 @@ help: the trait `IntoBytes` is not implemented for `SrcD` AtomicIsize and 74 others note: required by a bound in `zerocopy::util::macro_util::Wrap::<&'a mut Src, &'a mut Dst>::transmute_mut` - --> src/util/macro_util.rs:800:26 + --> src/util/macro_util.rs:791:26 | -798 | pub fn transmute_mut(self) -> &'a mut Dst +789 | pub fn transmute_mut(self) -> &'a mut Dst | ------------- required by a bound in this associated function -799 | where -800 | Src: FromBytes + IntoBytes, +790 | where +791 | Src: FromBytes + IntoBytes, | ^^^^^^^^^ required by this bound in `Wrap::<&mut Src, &mut Dst>::transmute_mut` = note: this error originates in the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -196,9 +196,9 @@ error[E0599]: the method `transmute_mut` exists for struct `zerocopy::util::macr 87 | const SRC_UNSIZED: &mut [u8; 1] = transmute_mut!(&mut [0u8][..]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - ::: src/util/macro_util.rs:681:1 + ::: src/util/macro_util.rs:677:1 | -681 | pub struct Wrap(pub Src, pub PhantomData); +677 | pub struct Wrap(pub Src, pub PhantomData); | ------------------------- doesn't satisfy `_: TransmuteMutDst<'_>` | = note: the following trait bounds were not satisfied: diff --git a/tests/ui/transmute_mut.stable.stderr b/tests/ui/transmute_mut.stable.stderr index 1671505084..3ea0fbca5e 100644 --- a/tests/ui/transmute_mut.stable.stderr +++ b/tests/ui/transmute_mut.stable.stderr @@ -41,12 +41,12 @@ help: the trait `FromBytes` is not implemented for `DstA` (A, B, C, D, E, F, G, H) and 85 others note: required by a bound in `Wrap::<&'a mut Src, &'a mut Dst>::transmute_mut` - --> $WORKSPACE/src/util/macro_util.rs:801:14 + --> $WORKSPACE/src/util/macro_util.rs:792:14 | -798 | pub fn transmute_mut(self) -> &'a mut Dst +789 | pub fn transmute_mut(self) -> &'a mut Dst | ------------- required by a bound in this associated function ... -801 | Dst: FromBytes + IntoBytes, +792 | Dst: FromBytes + IntoBytes, | ^^^^^^^^^ required by this bound in `Wrap::<&mut Src, &mut Dst>::transmute_mut` = note: this error originates in the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -73,12 +73,12 @@ help: the trait `IntoBytes` is not implemented for `DstB` AtomicIsize and 74 others note: required by a bound in `Wrap::<&'a mut Src, &'a mut Dst>::transmute_mut` - --> $WORKSPACE/src/util/macro_util.rs:801:26 + --> $WORKSPACE/src/util/macro_util.rs:792:26 | -798 | pub fn transmute_mut(self) -> &'a mut Dst +789 | pub fn transmute_mut(self) -> &'a mut Dst | ------------- required by a bound in this associated function ... -801 | Dst: FromBytes + IntoBytes, +792 | Dst: FromBytes + IntoBytes, | ^^^^^^^^^ required by this bound in `Wrap::<&mut Src, &mut Dst>::transmute_mut` = note: this error originates in the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -149,12 +149,12 @@ help: the trait `FromBytes` is not implemented for `SrcC` (A, B, C, D, E, F, G, H) and 85 others note: required by a bound in `Wrap::<&'a mut Src, &'a mut Dst>::transmute_mut` - --> $WORKSPACE/src/util/macro_util.rs:800:14 + --> $WORKSPACE/src/util/macro_util.rs:791:14 | -798 | pub fn transmute_mut(self) -> &'a mut Dst +789 | pub fn transmute_mut(self) -> &'a mut Dst | ------------- required by a bound in this associated function -799 | where -800 | Src: FromBytes + IntoBytes, +790 | where +791 | Src: FromBytes + IntoBytes, | ^^^^^^^^^ required by this bound in `Wrap::<&mut Src, &mut Dst>::transmute_mut` = note: this error originates in the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -181,12 +181,12 @@ help: the trait `IntoBytes` is not implemented for `SrcD` AtomicIsize and 74 others note: required by a bound in `Wrap::<&'a mut Src, &'a mut Dst>::transmute_mut` - --> $WORKSPACE/src/util/macro_util.rs:800:26 + --> $WORKSPACE/src/util/macro_util.rs:791:26 | -798 | pub fn transmute_mut(self) -> &'a mut Dst +789 | pub fn transmute_mut(self) -> &'a mut Dst | ------------- required by a bound in this associated function -799 | where -800 | Src: FromBytes + IntoBytes, +790 | where +791 | Src: FromBytes + IntoBytes, | ^^^^^^^^^ required by this bound in `Wrap::<&mut Src, &mut Dst>::transmute_mut` = note: this error originates in the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -196,9 +196,9 @@ error[E0599]: the method `transmute_mut` exists for struct `Wrap<&mut [u8], &mut 87 | const SRC_UNSIZED: &mut [u8; 1] = transmute_mut!(&mut [0u8][..]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - ::: $WORKSPACE/src/util/macro_util.rs:681:1 + ::: $WORKSPACE/src/util/macro_util.rs:677:1 | -681 | pub struct Wrap(pub Src, pub PhantomData); +677 | pub struct Wrap(pub Src, pub PhantomData); | ------------------------- doesn't satisfy `Wrap<&mut [u8], &mut [u8; 1]>: TransmuteMutDst<'_>` | = note: the following trait bounds were not satisfied: diff --git a/tests/ui/transmute_ref.msrv.stderr b/tests/ui/transmute_ref.msrv.stderr index f1192b4cd0..0b33883eb7 100644 --- a/tests/ui/transmute_ref.msrv.stderr +++ b/tests/ui/transmute_ref.msrv.stderr @@ -272,9 +272,9 @@ error[E0599]: the method `transmute_ref` exists for struct `Wrap<&[u8], &[u8; 1] 84 | const SRC_UNSIZED: &[u8; 1] = transmute_ref!(&[0u8][..]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | - ::: $WORKSPACE/src/util/macro_util.rs:681:1 + ::: $WORKSPACE/src/util/macro_util.rs:677:1 | -681 | pub struct Wrap(pub Src, pub PhantomData); +677 | pub struct Wrap(pub Src, pub PhantomData); | ------------------------- doesn't satisfy `Wrap<&[u8], &[u8; 1]>: TransmuteRefDst<'_>` | = note: the following trait bounds were not satisfied: diff --git a/tests/ui/transmute_ref.nightly.stderr b/tests/ui/transmute_ref.nightly.stderr index ce9c63083d..38228d87dc 100644 --- a/tests/ui/transmute_ref.nightly.stderr +++ b/tests/ui/transmute_ref.nightly.stderr @@ -342,9 +342,9 @@ error[E0599]: the method `transmute_ref` exists for struct `zerocopy::util::macr 84 | const SRC_UNSIZED: &[u8; 1] = transmute_ref!(&[0u8][..]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | - ::: src/util/macro_util.rs:681:1 + ::: src/util/macro_util.rs:677:1 | -681 | pub struct Wrap(pub Src, pub PhantomData); +677 | pub struct Wrap(pub Src, pub PhantomData); | ------------------------- doesn't satisfy `_: TransmuteRefDst<'_>` | = note: the following trait bounds were not satisfied: diff --git a/tests/ui/transmute_ref.stable.stderr b/tests/ui/transmute_ref.stable.stderr index c32ba4576b..c1b3a0c4c2 100644 --- a/tests/ui/transmute_ref.stable.stderr +++ b/tests/ui/transmute_ref.stable.stderr @@ -342,9 +342,9 @@ error[E0599]: the method `transmute_ref` exists for struct `Wrap<&[u8], &[u8; 1] 84 | const SRC_UNSIZED: &[u8; 1] = transmute_ref!(&[0u8][..]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | - ::: $WORKSPACE/src/util/macro_util.rs:681:1 + ::: $WORKSPACE/src/util/macro_util.rs:677:1 | -681 | pub struct Wrap(pub Src, pub PhantomData); +677 | pub struct Wrap(pub Src, pub PhantomData); | ------------------------- doesn't satisfy `Wrap<&[u8], &[u8; 1]>: TransmuteRefDst<'_>` | = note: the following trait bounds were not satisfied: diff --git a/tests/ui/try_transmute.msrv.stderr b/tests/ui/try_transmute.msrv.stderr index 7993e9ea46..7b1ba648e0 100644 --- a/tests/ui/try_transmute.msrv.stderr +++ b/tests/ui/try_transmute.msrv.stderr @@ -39,12 +39,12 @@ error[E0277]: the trait bound `NotZerocopy: TryFromBytes` is not satisfied i128 and 153 others note: required by a bound in `try_transmute` - --> $WORKSPACE/src/util/macro_util.rs:515:10 + --> $WORKSPACE/src/util/macro_util.rs:511:10 | -512 | pub fn try_transmute(src: Src) -> Result> +508 | pub fn try_transmute(src: Src) -> Result> | ------------- required by a bound in this function ... -515 | Dst: TryFromBytes, +511 | Dst: TryFromBytes, | ^^^^^^^^^^^^ required by this bound in `try_transmute` = note: this error originates in the macro `try_transmute` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -90,12 +90,12 @@ error[E0277]: the trait bound `NotZerocopy: IntoBytes` is not satisfied i128 and 68 others note: required by a bound in `try_transmute` - --> $WORKSPACE/src/util/macro_util.rs:514:10 + --> $WORKSPACE/src/util/macro_util.rs:510:10 | -512 | pub fn try_transmute(src: Src) -> Result> +508 | pub fn try_transmute(src: Src) -> Result> | ------------- required by a bound in this function -513 | where -514 | Src: IntoBytes, +509 | where +510 | Src: IntoBytes, | ^^^^^^^^^ required by this bound in `try_transmute` = note: this error originates in the macro `try_transmute` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/try_transmute.nightly.stderr b/tests/ui/try_transmute.nightly.stderr index 0b7c1e0e5a..d7f4cc6e9c 100644 --- a/tests/ui/try_transmute.nightly.stderr +++ b/tests/ui/try_transmute.nightly.stderr @@ -49,12 +49,12 @@ help: the trait `TryFromBytes` is not implemented for `NotZerocopy` (A, B, C, D, E, F, G, H) and 153 others note: required by a bound in `zerocopy::util::macro_util::try_transmute` - --> src/util/macro_util.rs:515:10 + --> src/util/macro_util.rs:511:10 | -512 | pub fn try_transmute(src: Src) -> Result> +508 | pub fn try_transmute(src: Src) -> Result> | ------------- required by a bound in this function ... -515 | Dst: TryFromBytes, +511 | Dst: TryFromBytes, | ^^^^^^^^^^^^ required by this bound in `try_transmute` = note: this error originates in the macro `try_transmute` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -110,12 +110,12 @@ help: the trait `IntoBytes` is not implemented for `NotZerocopy` AtomicIsize and 68 others note: required by a bound in `zerocopy::util::macro_util::try_transmute` - --> src/util/macro_util.rs:514:10 + --> src/util/macro_util.rs:510:10 | -512 | pub fn try_transmute(src: Src) -> Result> +508 | pub fn try_transmute(src: Src) -> Result> | ------------- required by a bound in this function -513 | where -514 | Src: IntoBytes, +509 | where +510 | Src: IntoBytes, | ^^^^^^^^^ required by this bound in `try_transmute` = note: this error originates in the macro `try_transmute` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/try_transmute.stable.stderr b/tests/ui/try_transmute.stable.stderr index fd18ec11d1..8f8dfba298 100644 --- a/tests/ui/try_transmute.stable.stderr +++ b/tests/ui/try_transmute.stable.stderr @@ -49,12 +49,12 @@ help: the trait `TryFromBytes` is not implemented for `NotZerocopy` (A, B, C, D, E, F, G, H) and 153 others note: required by a bound in `try_transmute` - --> $WORKSPACE/src/util/macro_util.rs:515:10 + --> $WORKSPACE/src/util/macro_util.rs:511:10 | -512 | pub fn try_transmute(src: Src) -> Result> +508 | pub fn try_transmute(src: Src) -> Result> | ------------- required by a bound in this function ... -515 | Dst: TryFromBytes, +511 | Dst: TryFromBytes, | ^^^^^^^^^^^^ required by this bound in `try_transmute` = note: this error originates in the macro `try_transmute` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -110,12 +110,12 @@ help: the trait `IntoBytes` is not implemented for `NotZerocopy` AtomicIsize and 68 others note: required by a bound in `try_transmute` - --> $WORKSPACE/src/util/macro_util.rs:514:10 + --> $WORKSPACE/src/util/macro_util.rs:510:10 | -512 | pub fn try_transmute(src: Src) -> Result> +508 | pub fn try_transmute(src: Src) -> Result> | ------------- required by a bound in this function -513 | where -514 | Src: IntoBytes, +509 | where +510 | Src: IntoBytes, | ^^^^^^^^^ required by this bound in `try_transmute` = note: this error originates in the macro `try_transmute` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/try_transmute_mut.msrv.stderr b/tests/ui/try_transmute_mut.msrv.stderr index f4f285041d..283fe2c437 100644 --- a/tests/ui/try_transmute_mut.msrv.stderr +++ b/tests/ui/try_transmute_mut.msrv.stderr @@ -16,12 +16,12 @@ error[E0277]: the trait bound `NotZerocopy: TryFromBytes` is not satisfied i128 and 156 others note: required by a bound in `Wrap::<&'a mut Src, &'a mut Dst>::try_transmute_mut` - --> $WORKSPACE/src/util/macro_util.rs:824:14 + --> $WORKSPACE/src/util/macro_util.rs:815:14 | -821 | pub fn try_transmute_mut(self) -> Result<&'a mut Dst, ValidityError<&'a mut Src, Dst>> +812 | pub fn try_transmute_mut(self) -> Result<&'a mut Dst, ValidityError<&'a mut Src, Dst>> | ----------------- required by a bound in this associated function ... -824 | Dst: TryFromBytes + IntoBytes, +815 | Dst: TryFromBytes + IntoBytes, | ^^^^^^^^^^^^ required by this bound in `Wrap::<&mut Src, &mut Dst>::try_transmute_mut` = note: this error originates in the macro `try_transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -43,12 +43,12 @@ error[E0277]: the trait bound `NotZerocopy: IntoBytes` is not satisfied i128 and 69 others note: required by a bound in `Wrap::<&'a mut Src, &'a mut Dst>::try_transmute_mut` - --> $WORKSPACE/src/util/macro_util.rs:824:29 + --> $WORKSPACE/src/util/macro_util.rs:815:29 | -821 | pub fn try_transmute_mut(self) -> Result<&'a mut Dst, ValidityError<&'a mut Src, Dst>> +812 | pub fn try_transmute_mut(self) -> Result<&'a mut Dst, ValidityError<&'a mut Src, Dst>> | ----------------- required by a bound in this associated function ... -824 | Dst: TryFromBytes + IntoBytes, +815 | Dst: TryFromBytes + IntoBytes, | ^^^^^^^^^ required by this bound in `Wrap::<&mut Src, &mut Dst>::try_transmute_mut` = note: this error originates in the macro `try_transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -117,12 +117,12 @@ error[E0277]: the trait bound `SrcA: FromBytes` is not satisfied u8 and 80 others note: required by a bound in `Wrap::<&'a mut Src, &'a mut Dst>::try_transmute_mut` - --> $WORKSPACE/src/util/macro_util.rs:823:14 + --> $WORKSPACE/src/util/macro_util.rs:814:14 | -821 | pub fn try_transmute_mut(self) -> Result<&'a mut Dst, ValidityError<&'a mut Src, Dst>> +812 | pub fn try_transmute_mut(self) -> Result<&'a mut Dst, ValidityError<&'a mut Src, Dst>> | ----------------- required by a bound in this associated function -822 | where -823 | Src: FromBytes + IntoBytes, +813 | where +814 | Src: FromBytes + IntoBytes, | ^^^^^^^^^ required by this bound in `Wrap::<&mut Src, &mut Dst>::try_transmute_mut` = note: this error originates in the macro `try_transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -144,12 +144,12 @@ error[E0277]: the trait bound `DstA: IntoBytes` is not satisfied i128 and 69 others note: required by a bound in `Wrap::<&'a mut Src, &'a mut Dst>::try_transmute_mut` - --> $WORKSPACE/src/util/macro_util.rs:824:29 + --> $WORKSPACE/src/util/macro_util.rs:815:29 | -821 | pub fn try_transmute_mut(self) -> Result<&'a mut Dst, ValidityError<&'a mut Src, Dst>> +812 | pub fn try_transmute_mut(self) -> Result<&'a mut Dst, ValidityError<&'a mut Src, Dst>> | ----------------- required by a bound in this associated function ... -824 | Dst: TryFromBytes + IntoBytes, +815 | Dst: TryFromBytes + IntoBytes, | ^^^^^^^^^ required by this bound in `Wrap::<&mut Src, &mut Dst>::try_transmute_mut` = note: this error originates in the macro `try_transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -171,12 +171,12 @@ error[E0277]: the trait bound `SrcB: IntoBytes` is not satisfied i128 and 69 others note: required by a bound in `Wrap::<&'a mut Src, &'a mut Dst>::try_transmute_mut` - --> $WORKSPACE/src/util/macro_util.rs:823:26 + --> $WORKSPACE/src/util/macro_util.rs:814:26 | -821 | pub fn try_transmute_mut(self) -> Result<&'a mut Dst, ValidityError<&'a mut Src, Dst>> +812 | pub fn try_transmute_mut(self) -> Result<&'a mut Dst, ValidityError<&'a mut Src, Dst>> | ----------------- required by a bound in this associated function -822 | where -823 | Src: FromBytes + IntoBytes, +813 | where +814 | Src: FromBytes + IntoBytes, | ^^^^^^^^^ required by this bound in `Wrap::<&mut Src, &mut Dst>::try_transmute_mut` = note: this error originates in the macro `try_transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -198,12 +198,12 @@ error[E0277]: the trait bound `DstB: IntoBytes` is not satisfied i128 and 69 others note: required by a bound in `Wrap::<&'a mut Src, &'a mut Dst>::try_transmute_mut` - --> $WORKSPACE/src/util/macro_util.rs:824:29 + --> $WORKSPACE/src/util/macro_util.rs:815:29 | -821 | pub fn try_transmute_mut(self) -> Result<&'a mut Dst, ValidityError<&'a mut Src, Dst>> +812 | pub fn try_transmute_mut(self) -> Result<&'a mut Dst, ValidityError<&'a mut Src, Dst>> | ----------------- required by a bound in this associated function ... -824 | Dst: TryFromBytes + IntoBytes, +815 | Dst: TryFromBytes + IntoBytes, | ^^^^^^^^^ required by this bound in `Wrap::<&mut Src, &mut Dst>::try_transmute_mut` = note: this error originates in the macro `try_transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/try_transmute_mut.nightly.stderr b/tests/ui/try_transmute_mut.nightly.stderr index 6941406d75..269cc58e36 100644 --- a/tests/ui/try_transmute_mut.nightly.stderr +++ b/tests/ui/try_transmute_mut.nightly.stderr @@ -21,12 +21,12 @@ help: the trait `TryFromBytes` is not implemented for `NotZerocopy` (A, B, C, D, E, F, G, H) and 156 others note: required by a bound in `zerocopy::util::macro_util::Wrap::<&'a mut Src, &'a mut Dst>::try_transmute_mut` - --> src/util/macro_util.rs:824:14 + --> src/util/macro_util.rs:815:14 | -821 | pub fn try_transmute_mut(self) -> Result<&'a mut Dst, ValidityError<&'a mut Src, Dst>> +812 | pub fn try_transmute_mut(self) -> Result<&'a mut Dst, ValidityError<&'a mut Src, Dst>> | ----------------- required by a bound in this associated function ... -824 | Dst: TryFromBytes + IntoBytes, +815 | Dst: TryFromBytes + IntoBytes, | ^^^^^^^^^^^^ required by this bound in `Wrap::<&mut Src, &mut Dst>::try_transmute_mut` = note: this error originates in the macro `try_transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -53,12 +53,12 @@ help: the trait `IntoBytes` is not implemented for `NotZerocopy` AtomicIsize and 69 others note: required by a bound in `zerocopy::util::macro_util::Wrap::<&'a mut Src, &'a mut Dst>::try_transmute_mut` - --> src/util/macro_util.rs:824:29 + --> src/util/macro_util.rs:815:29 | -821 | pub fn try_transmute_mut(self) -> Result<&'a mut Dst, ValidityError<&'a mut Src, Dst>> +812 | pub fn try_transmute_mut(self) -> Result<&'a mut Dst, ValidityError<&'a mut Src, Dst>> | ----------------- required by a bound in this associated function ... -824 | Dst: TryFromBytes + IntoBytes, +815 | Dst: TryFromBytes + IntoBytes, | ^^^^^^^^^ required by this bound in `Wrap::<&mut Src, &mut Dst>::try_transmute_mut` = note: this error originates in the macro `try_transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -142,12 +142,12 @@ help: the trait `FromBytes` is not implemented for `SrcA` (A, B, C, D, E, F, G, H) and 80 others note: required by a bound in `zerocopy::util::macro_util::Wrap::<&'a mut Src, &'a mut Dst>::try_transmute_mut` - --> src/util/macro_util.rs:823:14 + --> src/util/macro_util.rs:814:14 | -821 | pub fn try_transmute_mut(self) -> Result<&'a mut Dst, ValidityError<&'a mut Src, Dst>> +812 | pub fn try_transmute_mut(self) -> Result<&'a mut Dst, ValidityError<&'a mut Src, Dst>> | ----------------- required by a bound in this associated function -822 | where -823 | Src: FromBytes + IntoBytes, +813 | where +814 | Src: FromBytes + IntoBytes, | ^^^^^^^^^ required by this bound in `Wrap::<&mut Src, &mut Dst>::try_transmute_mut` = note: this error originates in the macro `try_transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -174,12 +174,12 @@ help: the trait `IntoBytes` is not implemented for `DstA` AtomicIsize and 69 others note: required by a bound in `zerocopy::util::macro_util::Wrap::<&'a mut Src, &'a mut Dst>::try_transmute_mut` - --> src/util/macro_util.rs:824:29 + --> src/util/macro_util.rs:815:29 | -821 | pub fn try_transmute_mut(self) -> Result<&'a mut Dst, ValidityError<&'a mut Src, Dst>> +812 | pub fn try_transmute_mut(self) -> Result<&'a mut Dst, ValidityError<&'a mut Src, Dst>> | ----------------- required by a bound in this associated function ... -824 | Dst: TryFromBytes + IntoBytes, +815 | Dst: TryFromBytes + IntoBytes, | ^^^^^^^^^ required by this bound in `Wrap::<&mut Src, &mut Dst>::try_transmute_mut` = note: this error originates in the macro `try_transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -206,12 +206,12 @@ help: the trait `IntoBytes` is not implemented for `SrcB` AtomicIsize and 69 others note: required by a bound in `zerocopy::util::macro_util::Wrap::<&'a mut Src, &'a mut Dst>::try_transmute_mut` - --> src/util/macro_util.rs:823:26 + --> src/util/macro_util.rs:814:26 | -821 | pub fn try_transmute_mut(self) -> Result<&'a mut Dst, ValidityError<&'a mut Src, Dst>> +812 | pub fn try_transmute_mut(self) -> Result<&'a mut Dst, ValidityError<&'a mut Src, Dst>> | ----------------- required by a bound in this associated function -822 | where -823 | Src: FromBytes + IntoBytes, +813 | where +814 | Src: FromBytes + IntoBytes, | ^^^^^^^^^ required by this bound in `Wrap::<&mut Src, &mut Dst>::try_transmute_mut` = note: this error originates in the macro `try_transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -238,12 +238,12 @@ help: the trait `IntoBytes` is not implemented for `DstB` AtomicIsize and 69 others note: required by a bound in `zerocopy::util::macro_util::Wrap::<&'a mut Src, &'a mut Dst>::try_transmute_mut` - --> src/util/macro_util.rs:824:29 + --> src/util/macro_util.rs:815:29 | -821 | pub fn try_transmute_mut(self) -> Result<&'a mut Dst, ValidityError<&'a mut Src, Dst>> +812 | pub fn try_transmute_mut(self) -> Result<&'a mut Dst, ValidityError<&'a mut Src, Dst>> | ----------------- required by a bound in this associated function ... -824 | Dst: TryFromBytes + IntoBytes, +815 | Dst: TryFromBytes + IntoBytes, | ^^^^^^^^^ required by this bound in `Wrap::<&mut Src, &mut Dst>::try_transmute_mut` = note: this error originates in the macro `try_transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/try_transmute_mut.stable.stderr b/tests/ui/try_transmute_mut.stable.stderr index 2f1d2897b3..8cfcb57b45 100644 --- a/tests/ui/try_transmute_mut.stable.stderr +++ b/tests/ui/try_transmute_mut.stable.stderr @@ -21,12 +21,12 @@ help: the trait `TryFromBytes` is not implemented for `NotZerocopy` (A, B, C, D, E, F, G, H) and 156 others note: required by a bound in `Wrap::<&'a mut Src, &'a mut Dst>::try_transmute_mut` - --> $WORKSPACE/src/util/macro_util.rs:824:14 + --> $WORKSPACE/src/util/macro_util.rs:815:14 | -821 | pub fn try_transmute_mut(self) -> Result<&'a mut Dst, ValidityError<&'a mut Src, Dst>> +812 | pub fn try_transmute_mut(self) -> Result<&'a mut Dst, ValidityError<&'a mut Src, Dst>> | ----------------- required by a bound in this associated function ... -824 | Dst: TryFromBytes + IntoBytes, +815 | Dst: TryFromBytes + IntoBytes, | ^^^^^^^^^^^^ required by this bound in `Wrap::<&mut Src, &mut Dst>::try_transmute_mut` = note: this error originates in the macro `try_transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -53,12 +53,12 @@ help: the trait `IntoBytes` is not implemented for `NotZerocopy` AtomicIsize and 69 others note: required by a bound in `Wrap::<&'a mut Src, &'a mut Dst>::try_transmute_mut` - --> $WORKSPACE/src/util/macro_util.rs:824:29 + --> $WORKSPACE/src/util/macro_util.rs:815:29 | -821 | pub fn try_transmute_mut(self) -> Result<&'a mut Dst, ValidityError<&'a mut Src, Dst>> +812 | pub fn try_transmute_mut(self) -> Result<&'a mut Dst, ValidityError<&'a mut Src, Dst>> | ----------------- required by a bound in this associated function ... -824 | Dst: TryFromBytes + IntoBytes, +815 | Dst: TryFromBytes + IntoBytes, | ^^^^^^^^^ required by this bound in `Wrap::<&mut Src, &mut Dst>::try_transmute_mut` = note: this error originates in the macro `try_transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -142,12 +142,12 @@ help: the trait `FromBytes` is not implemented for `SrcA` (A, B, C, D, E, F, G, H) and 80 others note: required by a bound in `Wrap::<&'a mut Src, &'a mut Dst>::try_transmute_mut` - --> $WORKSPACE/src/util/macro_util.rs:823:14 + --> $WORKSPACE/src/util/macro_util.rs:814:14 | -821 | pub fn try_transmute_mut(self) -> Result<&'a mut Dst, ValidityError<&'a mut Src, Dst>> +812 | pub fn try_transmute_mut(self) -> Result<&'a mut Dst, ValidityError<&'a mut Src, Dst>> | ----------------- required by a bound in this associated function -822 | where -823 | Src: FromBytes + IntoBytes, +813 | where +814 | Src: FromBytes + IntoBytes, | ^^^^^^^^^ required by this bound in `Wrap::<&mut Src, &mut Dst>::try_transmute_mut` = note: this error originates in the macro `try_transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -174,12 +174,12 @@ help: the trait `IntoBytes` is not implemented for `DstA` AtomicIsize and 69 others note: required by a bound in `Wrap::<&'a mut Src, &'a mut Dst>::try_transmute_mut` - --> $WORKSPACE/src/util/macro_util.rs:824:29 + --> $WORKSPACE/src/util/macro_util.rs:815:29 | -821 | pub fn try_transmute_mut(self) -> Result<&'a mut Dst, ValidityError<&'a mut Src, Dst>> +812 | pub fn try_transmute_mut(self) -> Result<&'a mut Dst, ValidityError<&'a mut Src, Dst>> | ----------------- required by a bound in this associated function ... -824 | Dst: TryFromBytes + IntoBytes, +815 | Dst: TryFromBytes + IntoBytes, | ^^^^^^^^^ required by this bound in `Wrap::<&mut Src, &mut Dst>::try_transmute_mut` = note: this error originates in the macro `try_transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -206,12 +206,12 @@ help: the trait `IntoBytes` is not implemented for `SrcB` AtomicIsize and 69 others note: required by a bound in `Wrap::<&'a mut Src, &'a mut Dst>::try_transmute_mut` - --> $WORKSPACE/src/util/macro_util.rs:823:26 + --> $WORKSPACE/src/util/macro_util.rs:814:26 | -821 | pub fn try_transmute_mut(self) -> Result<&'a mut Dst, ValidityError<&'a mut Src, Dst>> +812 | pub fn try_transmute_mut(self) -> Result<&'a mut Dst, ValidityError<&'a mut Src, Dst>> | ----------------- required by a bound in this associated function -822 | where -823 | Src: FromBytes + IntoBytes, +813 | where +814 | Src: FromBytes + IntoBytes, | ^^^^^^^^^ required by this bound in `Wrap::<&mut Src, &mut Dst>::try_transmute_mut` = note: this error originates in the macro `try_transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -238,12 +238,12 @@ help: the trait `IntoBytes` is not implemented for `DstB` AtomicIsize and 69 others note: required by a bound in `Wrap::<&'a mut Src, &'a mut Dst>::try_transmute_mut` - --> $WORKSPACE/src/util/macro_util.rs:824:29 + --> $WORKSPACE/src/util/macro_util.rs:815:29 | -821 | pub fn try_transmute_mut(self) -> Result<&'a mut Dst, ValidityError<&'a mut Src, Dst>> +812 | pub fn try_transmute_mut(self) -> Result<&'a mut Dst, ValidityError<&'a mut Src, Dst>> | ----------------- required by a bound in this associated function ... -824 | Dst: TryFromBytes + IntoBytes, +815 | Dst: TryFromBytes + IntoBytes, | ^^^^^^^^^ required by this bound in `Wrap::<&mut Src, &mut Dst>::try_transmute_mut` = note: this error originates in the macro `try_transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/try_transmute_ref.msrv.stderr b/tests/ui/try_transmute_ref.msrv.stderr index 0eb99dc502..d3604fa0ec 100644 --- a/tests/ui/try_transmute_ref.msrv.stderr +++ b/tests/ui/try_transmute_ref.msrv.stderr @@ -33,12 +33,12 @@ error[E0277]: the trait bound `NotZerocopy: TryFromBytes` is not satisfied i128 and 153 others note: required by a bound in `Wrap::<&'a Src, &'a Dst>::try_transmute_ref` - --> $WORKSPACE/src/util/macro_util.rs:744:14 + --> $WORKSPACE/src/util/macro_util.rs:735:14 | -741 | pub fn try_transmute_ref(self) -> Result<&'a Dst, ValidityError<&'a Src, Dst>> +732 | pub fn try_transmute_ref(self) -> Result<&'a Dst, ValidityError<&'a Src, Dst>> | ----------------- required by a bound in this associated function ... -744 | Dst: TryFromBytes + Immutable, +735 | Dst: TryFromBytes + Immutable, | ^^^^^^^^^^^^ required by this bound in `Wrap::<&Src, &Dst>::try_transmute_ref` = note: this error originates in the macro `try_transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -60,12 +60,12 @@ error[E0277]: the trait bound `NotZerocopy: Immutable` is not satisfied i128 and 128 others note: required by a bound in `Wrap::<&'a Src, &'a Dst>::try_transmute_ref` - --> $WORKSPACE/src/util/macro_util.rs:744:29 + --> $WORKSPACE/src/util/macro_util.rs:735:29 | -741 | pub fn try_transmute_ref(self) -> Result<&'a Dst, ValidityError<&'a Src, Dst>> +732 | pub fn try_transmute_ref(self) -> Result<&'a Dst, ValidityError<&'a Src, Dst>> | ----------------- required by a bound in this associated function ... -744 | Dst: TryFromBytes + Immutable, +735 | Dst: TryFromBytes + Immutable, | ^^^^^^^^^ required by this bound in `Wrap::<&Src, &Dst>::try_transmute_ref` = note: this error originates in the macro `try_transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -134,12 +134,12 @@ error[E0277]: the trait bound `NotZerocopy: IntoBytes` is not satisfied i128 and 68 others note: required by a bound in `Wrap::<&'a Src, &'a Dst>::try_transmute_ref` - --> $WORKSPACE/src/util/macro_util.rs:743:14 + --> $WORKSPACE/src/util/macro_util.rs:734:14 | -741 | pub fn try_transmute_ref(self) -> Result<&'a Dst, ValidityError<&'a Src, Dst>> +732 | pub fn try_transmute_ref(self) -> Result<&'a Dst, ValidityError<&'a Src, Dst>> | ----------------- required by a bound in this associated function -742 | where -743 | Src: IntoBytes + Immutable, +733 | where +734 | Src: IntoBytes + Immutable, | ^^^^^^^^^ required by this bound in `Wrap::<&Src, &Dst>::try_transmute_ref` = note: this error originates in the macro `try_transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -161,12 +161,12 @@ error[E0277]: the trait bound `NotZerocopy: Immutable` is not satisfied i128 and 128 others note: required by a bound in `Wrap::<&'a Src, &'a Dst>::try_transmute_ref` - --> $WORKSPACE/src/util/macro_util.rs:743:26 + --> $WORKSPACE/src/util/macro_util.rs:734:26 | -741 | pub fn try_transmute_ref(self) -> Result<&'a Dst, ValidityError<&'a Src, Dst>> +732 | pub fn try_transmute_ref(self) -> Result<&'a Dst, ValidityError<&'a Src, Dst>> | ----------------- required by a bound in this associated function -742 | where -743 | Src: IntoBytes + Immutable, +733 | where +734 | Src: IntoBytes + Immutable, | ^^^^^^^^^ required by this bound in `Wrap::<&Src, &Dst>::try_transmute_ref` = note: this error originates in the macro `try_transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/try_transmute_ref.nightly.stderr b/tests/ui/try_transmute_ref.nightly.stderr index f8c9c737da..cd1cd8bd1c 100644 --- a/tests/ui/try_transmute_ref.nightly.stderr +++ b/tests/ui/try_transmute_ref.nightly.stderr @@ -38,12 +38,12 @@ help: the trait `TryFromBytes` is not implemented for `NotZerocopy` (A, B, C, D, E, F, G, H) and 153 others note: required by a bound in `zerocopy::util::macro_util::Wrap::<&'a Src, &'a Dst>::try_transmute_ref` - --> src/util/macro_util.rs:744:14 + --> src/util/macro_util.rs:735:14 | -741 | pub fn try_transmute_ref(self) -> Result<&'a Dst, ValidityError<&'a Src, Dst>> +732 | pub fn try_transmute_ref(self) -> Result<&'a Dst, ValidityError<&'a Src, Dst>> | ----------------- required by a bound in this associated function ... -744 | Dst: TryFromBytes + Immutable, +735 | Dst: TryFromBytes + Immutable, | ^^^^^^^^^^^^ required by this bound in `Wrap::<&Src, &Dst>::try_transmute_ref` = note: this error originates in the macro `try_transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -70,12 +70,12 @@ help: the trait `Immutable` is not implemented for `NotZerocopy` (A, B, C, D, E, F) and 128 others note: required by a bound in `zerocopy::util::macro_util::Wrap::<&'a Src, &'a Dst>::try_transmute_ref` - --> src/util/macro_util.rs:744:29 + --> src/util/macro_util.rs:735:29 | -741 | pub fn try_transmute_ref(self) -> Result<&'a Dst, ValidityError<&'a Src, Dst>> +732 | pub fn try_transmute_ref(self) -> Result<&'a Dst, ValidityError<&'a Src, Dst>> | ----------------- required by a bound in this associated function ... -744 | Dst: TryFromBytes + Immutable, +735 | Dst: TryFromBytes + Immutable, | ^^^^^^^^^ required by this bound in `Wrap::<&Src, &Dst>::try_transmute_ref` = note: this error originates in the macro `try_transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -159,12 +159,12 @@ help: the trait `IntoBytes` is not implemented for `NotZerocopy` AtomicIsize and 68 others note: required by a bound in `zerocopy::util::macro_util::Wrap::<&'a Src, &'a Dst>::try_transmute_ref` - --> src/util/macro_util.rs:743:14 + --> src/util/macro_util.rs:734:14 | -741 | pub fn try_transmute_ref(self) -> Result<&'a Dst, ValidityError<&'a Src, Dst>> +732 | pub fn try_transmute_ref(self) -> Result<&'a Dst, ValidityError<&'a Src, Dst>> | ----------------- required by a bound in this associated function -742 | where -743 | Src: IntoBytes + Immutable, +733 | where +734 | Src: IntoBytes + Immutable, | ^^^^^^^^^ required by this bound in `Wrap::<&Src, &Dst>::try_transmute_ref` = note: this error originates in the macro `try_transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -191,12 +191,12 @@ help: the trait `Immutable` is not implemented for `NotZerocopy` (A, B, C, D, E, F) and 128 others note: required by a bound in `zerocopy::util::macro_util::Wrap::<&'a Src, &'a Dst>::try_transmute_ref` - --> src/util/macro_util.rs:743:26 + --> src/util/macro_util.rs:734:26 | -741 | pub fn try_transmute_ref(self) -> Result<&'a Dst, ValidityError<&'a Src, Dst>> +732 | pub fn try_transmute_ref(self) -> Result<&'a Dst, ValidityError<&'a Src, Dst>> | ----------------- required by a bound in this associated function -742 | where -743 | Src: IntoBytes + Immutable, +733 | where +734 | Src: IntoBytes + Immutable, | ^^^^^^^^^ required by this bound in `Wrap::<&Src, &Dst>::try_transmute_ref` = note: this error originates in the macro `try_transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/try_transmute_ref.stable.stderr b/tests/ui/try_transmute_ref.stable.stderr index 1c73b12665..d789695fa7 100644 --- a/tests/ui/try_transmute_ref.stable.stderr +++ b/tests/ui/try_transmute_ref.stable.stderr @@ -38,12 +38,12 @@ help: the trait `TryFromBytes` is not implemented for `NotZerocopy` (A, B, C, D, E, F, G, H) and 153 others note: required by a bound in `Wrap::<&'a Src, &'a Dst>::try_transmute_ref` - --> $WORKSPACE/src/util/macro_util.rs:744:14 + --> $WORKSPACE/src/util/macro_util.rs:735:14 | -741 | pub fn try_transmute_ref(self) -> Result<&'a Dst, ValidityError<&'a Src, Dst>> +732 | pub fn try_transmute_ref(self) -> Result<&'a Dst, ValidityError<&'a Src, Dst>> | ----------------- required by a bound in this associated function ... -744 | Dst: TryFromBytes + Immutable, +735 | Dst: TryFromBytes + Immutable, | ^^^^^^^^^^^^ required by this bound in `Wrap::<&Src, &Dst>::try_transmute_ref` = note: this error originates in the macro `try_transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -70,12 +70,12 @@ help: the trait `Immutable` is not implemented for `NotZerocopy` (A, B, C, D, E, F) and 128 others note: required by a bound in `Wrap::<&'a Src, &'a Dst>::try_transmute_ref` - --> $WORKSPACE/src/util/macro_util.rs:744:29 + --> $WORKSPACE/src/util/macro_util.rs:735:29 | -741 | pub fn try_transmute_ref(self) -> Result<&'a Dst, ValidityError<&'a Src, Dst>> +732 | pub fn try_transmute_ref(self) -> Result<&'a Dst, ValidityError<&'a Src, Dst>> | ----------------- required by a bound in this associated function ... -744 | Dst: TryFromBytes + Immutable, +735 | Dst: TryFromBytes + Immutable, | ^^^^^^^^^ required by this bound in `Wrap::<&Src, &Dst>::try_transmute_ref` = note: this error originates in the macro `try_transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -159,12 +159,12 @@ help: the trait `IntoBytes` is not implemented for `NotZerocopy` AtomicIsize and 68 others note: required by a bound in `Wrap::<&'a Src, &'a Dst>::try_transmute_ref` - --> $WORKSPACE/src/util/macro_util.rs:743:14 + --> $WORKSPACE/src/util/macro_util.rs:734:14 | -741 | pub fn try_transmute_ref(self) -> Result<&'a Dst, ValidityError<&'a Src, Dst>> +732 | pub fn try_transmute_ref(self) -> Result<&'a Dst, ValidityError<&'a Src, Dst>> | ----------------- required by a bound in this associated function -742 | where -743 | Src: IntoBytes + Immutable, +733 | where +734 | Src: IntoBytes + Immutable, | ^^^^^^^^^ required by this bound in `Wrap::<&Src, &Dst>::try_transmute_ref` = note: this error originates in the macro `try_transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -191,12 +191,12 @@ help: the trait `Immutable` is not implemented for `NotZerocopy` (A, B, C, D, E, F) and 128 others note: required by a bound in `Wrap::<&'a Src, &'a Dst>::try_transmute_ref` - --> $WORKSPACE/src/util/macro_util.rs:743:26 + --> $WORKSPACE/src/util/macro_util.rs:734:26 | -741 | pub fn try_transmute_ref(self) -> Result<&'a Dst, ValidityError<&'a Src, Dst>> +732 | pub fn try_transmute_ref(self) -> Result<&'a Dst, ValidityError<&'a Src, Dst>> | ----------------- required by a bound in this associated function -742 | where -743 | Src: IntoBytes + Immutable, +733 | where +734 | Src: IntoBytes + Immutable, | ^^^^^^^^^ required by this bound in `Wrap::<&Src, &Dst>::try_transmute_ref` = note: this error originates in the macro `try_transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/zerocopy-derive/tests/ui/struct.msrv.stderr b/zerocopy-derive/tests/ui/struct.msrv.stderr index 93fe925c77..256afec002 100644 --- a/zerocopy-derive/tests/ui/struct.msrv.stderr +++ b/zerocopy-derive/tests/ui/struct.msrv.stderr @@ -307,9 +307,9 @@ note: required because it appears within the type `IntoBytes4` | ^^^^^^^^^^ = note: required for `IntoBytes4` to implement `macro_util::__size_of::Sized` note: required by a bound in `macro_util::__size_of::size_of` - --> $WORKSPACE/src/util/macro_util.rs:299:29 + --> $WORKSPACE/src/util/macro_util.rs:295:29 | -299 | pub const fn size_of() -> usize { +295 | pub const fn size_of() -> usize { | ^^^^^ required by this bound in `size_of` = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -324,9 +324,9 @@ error[E0277]: `[u8]` is unsized = note: `IntoBytes` does not require the fields of `#[repr(packed)]` types to be `Sized` = note: required for `[u8]` to implement `macro_util::__size_of::Sized` note: required by a bound in `macro_util::__size_of::size_of` - --> $WORKSPACE/src/util/macro_util.rs:299:29 + --> $WORKSPACE/src/util/macro_util.rs:295:29 | -299 | pub const fn size_of() -> usize { +295 | pub const fn size_of() -> usize { | ^^^^^ required by this bound in `size_of` error[E0277]: `IntoBytes5` has one or more padding bytes diff --git a/zerocopy-derive/tests/ui/struct.nightly.stderr b/zerocopy-derive/tests/ui/struct.nightly.stderr index b7f3b8013a..3577ee3e29 100644 --- a/zerocopy-derive/tests/ui/struct.nightly.stderr +++ b/zerocopy-derive/tests/ui/struct.nightly.stderr @@ -365,7 +365,7 @@ note: required because it appears within the type `IntoBytes4` | ^^^^^^^^^^ = note: required for `IntoBytes4` to implement `zerocopy_renamed::util::macro_util::__size_of::Sized` note: required by a bound in `zerocopy_renamed::util::macro_util::__size_of::size_of` - --> src/util/macro_util.rs:299:4 + --> src/util/macro_util.rs:295:4 = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: `[u8]` is unsized @@ -379,7 +379,7 @@ error[E0277]: `[u8]` is unsized = note: `IntoBytes` does not require the fields of `#[repr(packed)]` types to be `Sized` = note: required for `[u8]` to implement `zerocopy_renamed::util::macro_util::__size_of::Sized` note: required by a bound in `zerocopy_renamed::util::macro_util::__size_of::size_of` - --> src/util/macro_util.rs:299:4 + --> src/util/macro_util.rs:295:4 error[E0277]: `IntoBytes5` has one or more padding bytes --> $DIR/struct.rs:169:10 diff --git a/zerocopy-derive/tests/ui/struct.stable.stderr b/zerocopy-derive/tests/ui/struct.stable.stderr index 6d183b3cf1..c309bbe269 100644 --- a/zerocopy-derive/tests/ui/struct.stable.stderr +++ b/zerocopy-derive/tests/ui/struct.stable.stderr @@ -330,9 +330,9 @@ note: required because it appears within the type `IntoBytes4` | ^^^^^^^^^^ = note: required for `IntoBytes4` to implement `macro_util::__size_of::Sized` note: required by a bound in `macro_util::__size_of::size_of` - --> $WORKSPACE/src/util/macro_util.rs:299:29 + --> $WORKSPACE/src/util/macro_util.rs:295:29 | -299 | pub const fn size_of() -> usize { +295 | pub const fn size_of() -> usize { | ^^^^^ required by this bound in `size_of` = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -347,9 +347,9 @@ error[E0277]: `[u8]` is unsized = note: `IntoBytes` does not require the fields of `#[repr(packed)]` types to be `Sized` = note: required for `[u8]` to implement `macro_util::__size_of::Sized` note: required by a bound in `macro_util::__size_of::size_of` - --> $WORKSPACE/src/util/macro_util.rs:299:29 + --> $WORKSPACE/src/util/macro_util.rs:295:29 | -299 | pub const fn size_of() -> usize { +295 | pub const fn size_of() -> usize { | ^^^^^ required by this bound in `size_of` error[E0277]: `IntoBytes5` has one or more padding bytes