diff --git a/Cargo.toml b/Cargo.toml index addbaeb28b..050b8c014f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -46,7 +46,7 @@ zerocopy-panic-in-const = "1.57.0" [package.metadata.ci] # The versions of the stable and nightly compiler toolchains to use in CI. pinned-stable = "1.78.0" -pinned-nightly = "nightly-2024-05-20" +pinned-nightly = "nightly-2024-05-21" [package.metadata.docs.rs] all-features = true diff --git a/src/lib.rs b/src/lib.rs index fbd838f125..757021a2a5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4321,6 +4321,13 @@ macro_rules! transmute { // to enforce this so long as the types are concrete. let e = $e; + + #[allow(unknown_lints)] + // This code's soundness depends upon the inferred types being the + // correct ones. This lint catches cases in which that behavior is + // implicitly violated. We have no reason to expect it to happen - none + // of this code diverges, producing the never type - but it's a hedge. + #[deny(never_type_fallback_flowing_into_unsafe)] if false { // This branch, though never taken, ensures that the type of `e` is // `IntoBytes` and that the type of this macro invocation expression @@ -4439,7 +4446,12 @@ macro_rules! transmute_ref { // (note that mutable references are implicitly reborrowed here). let e: &_ = $e; - #[allow(unused, clippy::diverging_sub_expression)] + #[allow(unused, unknown_lints, clippy::diverging_sub_expression)] + // This code's soundness depends upon the inferred types being the + // correct ones. This lint catches cases in which that behavior is + // implicitly violated. We have no reason to expect it to happen - none + // of this code diverges, producing the never type - but it's a hedge. + #[deny(never_type_fallback_flowing_into_unsafe)] if false { // This branch, though never taken, ensures that the type of `e` is // `&T` where `T: 't + Sized + IntoBytes + Immutable`, that the type of @@ -4484,8 +4496,11 @@ macro_rules! transmute_ref { // value returned from this branch. let u; - $crate::assert_size_eq!(t, u); - $crate::assert_align_gt_eq!(t, u); + // SAFETY: This branch is never executed. + unsafe { $crate::unsafe_assert_size_eq!(t, u) }; + + // SAFETY: This branch is never executed. + unsafe { $crate::unsafe_assert_align_gt_eq!(t, u) }; &u } else { @@ -4586,7 +4601,12 @@ macro_rules! transmute_mut { // Ensure that the source type is a mutable reference. let e: &mut _ = $e; - #[allow(unused, clippy::diverging_sub_expression)] + #[allow(unused, unknown_lints, clippy::diverging_sub_expression)] + // This code's soundness depends upon the inferred types being the + // correct ones. This lint catches cases in which that behavior is + // implicitly violated. We have no reason to expect it to happen - none + // of this code diverges, producing the never type - but it's a hedge. + #[deny(never_type_fallback_flowing_into_unsafe)] if false { // This branch, though never taken, ensures that the type of `e` is // `&mut T` where `T: 't + Sized + FromBytes + IntoBytes + Immutable` @@ -4640,8 +4660,11 @@ macro_rules! transmute_mut { // the value returned from this branch. let u; - $crate::assert_size_eq!(t, u); - $crate::assert_align_gt_eq!(t, u); + // SAFETY: This branch is never executed. + unsafe { $crate::unsafe_assert_size_eq!(t, u) }; + + // SAFETY: This branch is never executed. + unsafe { $crate::unsafe_assert_align_gt_eq!(t, u) }; &mut u } else { @@ -4710,6 +4733,13 @@ macro_rules! try_transmute { // to enforce this so long as the types are concrete. let e = $e; + + #[allow(unknown_lints)] + // This code's soundness depends upon the inferred types being the + // correct ones. This lint catches cases in which that behavior is + // implicitly violated. We have no reason to expect it to happen - none + // of this code diverges, producing the never type - but it's a hedge. + #[deny(never_type_fallback_flowing_into_unsafe)] if false { // Check that the sizes of the source and destination types are // equal. diff --git a/src/macro_util.rs b/src/macro_util.rs index 6a1ee7cb15..ab7fa7d325 100644 --- a/src/macro_util.rs +++ b/src/macro_util.rs @@ -299,63 +299,61 @@ macro_rules! union_has_padding { }; } -/// Does `t` have alignment greater than or equal to `u`? If not, this macro -/// produces a compile error. It must be invoked in a dead codepath. This is -/// used in `transmute_ref!` and `transmute_mut!`. +/// Does `$t` have alignment greater than or equal to `$u`? If not, this macro +/// produces a compile error. It must be invoked in a dead codepath. +/// +/// # Safety +/// +/// The code generated by this macro must never be executed. #[doc(hidden)] // `#[macro_export]` bypasses this module's `#[doc(hidden)]`. #[macro_export] -macro_rules! assert_align_gt_eq { +macro_rules! unsafe_assert_align_gt_eq { ($t:ident, $u: ident) => {{ // The comments here should be read in the context of this macro's // invocations in `transmute_ref!` and `transmute_mut!`. - if false { - // The type wildcard in this bound is inferred to be `T` because - // `align_of.into_t()` is assigned to `t` (which has type `T`). - let align_of: $crate::macro_util::AlignOf<_> = unreachable!(); - $t = align_of.into_t(); - // `max_aligns` is inferred to have type `MaxAlignsOf` because - // of the inferred types of `t` and `u`. - let mut max_aligns = $crate::macro_util::MaxAlignsOf::new($t, $u); - - // This transmute will only compile successfully if - // `align_of::() == max(align_of::(), align_of::())` - in - // other words, if `align_of::() >= align_of::()`. - // - // SAFETY: This code is never run. - max_aligns = unsafe { - // Clippy: We can't annotate the types; this macro is designed - // to infer the types from the calling context. - #[allow(clippy::missing_transmute_annotations)] - $crate::macro_util::core_reexport::mem::transmute(align_of) - }; - } else { - loop {} - } + + // The type wildcard in this bound is inferred to be `T` because + // `align_of.into_t()` is assigned to `$t` (which has type `T`). + let align_of: $crate::macro_util::AlignOf<_> = unreachable!(); + $t = align_of.into_t(); + // `max_aligns` is inferred to have type `MaxAlignsOf` because of + // the inferred types of `$t` and `$u`. + let mut max_aligns = $crate::macro_util::MaxAlignsOf::new($t, $u); + + // This transmute will only compile successfully if `align_of::() == + // max(align_of::(), align_of::())` - in other words, if + // `align_of::() >= align_of::()`. + // + // SAFETY: The caller promises that this code is never run. + max_aligns = { + // Clippy: We can't annotate the types; this macro is designed + // to infer the types from the calling context. + #[allow(clippy::missing_transmute_annotations)] + $crate::macro_util::core_reexport::mem::transmute(align_of) + }; }}; } -/// Do `t` and `u` have the same size? If not, this macro produces a compile -/// error. It must be invoked in a dead codepath. This is used in -/// `transmute_ref!` and `transmute_mut!`. +/// Do `$t` and `$u` have the same size? If not, this macro produces a compile +/// error. It must be invoked in a dead codepath. +/// +/// # Safety +/// +/// The code generated by this macro must never be executed. #[doc(hidden)] // `#[macro_export]` bypasses this module's `#[doc(hidden)]`. #[macro_export] -macro_rules! assert_size_eq { - ($t:ident, $u: ident) => {{ - // The comments here should be read in the context of this macro's - // invocations in `transmute_ref!` and `transmute_mut!`. - if false { - // SAFETY: This code is never run. - $u = unsafe { - // Clippy: - // - It's okay to transmute a type to itself. - // - We can't annotate the types; this macro is designed to - // infer the types from the calling context. - #[allow(clippy::useless_transmute, clippy::missing_transmute_annotations)] - $crate::macro_util::core_reexport::mem::transmute($t) - }; - } else { - loop {} - } +macro_rules! unsafe_assert_size_eq { + ($t:ident, $u:ident) => {{ + // Clippy: + // - It's okay to transmute a type to itself. + // - We can't annotate the types; this macro is designed to infer the + // types from the types of `$t` and `$u`. + // + // SAFETY: The caller promises that this code is never executed. + $u = { + #[allow(clippy::useless_transmute, clippy::missing_transmute_annotations)] + $crate::macro_util::core_reexport::mem::transmute($t) + }; }}; } diff --git a/tests/ui-msrv/transmute-mut-alignment-increase.stderr b/tests/ui-msrv/transmute-mut-alignment-increase.stderr index 7b771b8521..286a5ab21c 100644 --- a/tests/ui-msrv/transmute-mut-alignment-increase.stderr +++ b/tests/ui-msrv/transmute-mut-alignment-increase.stderr @@ -6,7 +6,7 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `AlignOf<[u8; 2]>` (8 bits) = note: target type: `MaxAlignsOf<[u8; 2], AU16>` (16 bits) - = note: this error originates in the macro `$crate::assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0658]: mutable references are not allowed in constants --> tests/ui-msrv/transmute-mut-alignment-increase.rs:20:54 diff --git a/tests/ui-msrv/transmute-mut-dst-generic.stderr b/tests/ui-msrv/transmute-mut-dst-generic.stderr index f6b54ce1c2..6f48dcff18 100644 --- a/tests/ui-msrv/transmute-mut-dst-generic.stderr +++ b/tests/ui-msrv/transmute-mut-dst-generic.stderr @@ -6,7 +6,7 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `u8` (8 bits) = note: target type: `T` (this type does not have a fixed size) - = note: this error originates in the macro `$crate::assert_size_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0512]: cannot transmute between types of different sizes, or dependently-sized types --> tests/ui-msrv/transmute-mut-dst-generic.rs:17:5 @@ -16,4 +16,4 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `AlignOf` (8 bits) = note: target type: `MaxAlignsOf` (size can vary because of T) - = note: this error originates in the macro `$crate::assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui-msrv/transmute-mut-dst-unsized.stderr b/tests/ui-msrv/transmute-mut-dst-unsized.stderr index 31d7a70f34..36adcf4024 100644 --- a/tests/ui-msrv/transmute-mut-dst-unsized.stderr +++ b/tests/ui-msrv/transmute-mut-dst-unsized.stderr @@ -35,7 +35,7 @@ note: required by a bound in `MaxAlignsOf` | | pub union MaxAlignsOf { | ^ required by this bound in `MaxAlignsOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-msrv/transmute-mut-dst-unsized.rs:17:32 @@ -49,7 +49,7 @@ note: required by a bound in `transmute` | | pub fn transmute(e: T) -> U; | ^ required by this bound in `transmute` - = note: this error originates in the macro `$crate::assert_size_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-msrv/transmute-mut-dst-unsized.rs:17:32 @@ -63,7 +63,7 @@ note: required by `MaxAlignsOf::::new` | | pub fn new(_t: T, _u: U) -> MaxAlignsOf { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: this error originates in the macro `$crate::assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-msrv/transmute-mut-dst-unsized.rs:17:32 @@ -77,7 +77,7 @@ note: required by a bound in `MaxAlignsOf` | | pub union MaxAlignsOf { | ^ required by this bound in `MaxAlignsOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-msrv/transmute-mut-dst-unsized.rs:17:32 diff --git a/tests/ui-msrv/transmute-mut-size-decrease.stderr b/tests/ui-msrv/transmute-mut-size-decrease.stderr index ee3261ed28..7ef27dc82e 100644 --- a/tests/ui-msrv/transmute-mut-size-decrease.stderr +++ b/tests/ui-msrv/transmute-mut-size-decrease.stderr @@ -6,7 +6,7 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `[u8; 2]` (16 bits) = note: target type: `u8` (8 bits) - = note: this error originates in the macro `$crate::assert_size_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0658]: mutable references are not allowed in constants --> tests/ui-msrv/transmute-mut-size-decrease.rs:17:47 diff --git a/tests/ui-msrv/transmute-mut-size-increase.stderr b/tests/ui-msrv/transmute-mut-size-increase.stderr index 242493ff0a..7018088014 100644 --- a/tests/ui-msrv/transmute-mut-size-increase.stderr +++ b/tests/ui-msrv/transmute-mut-size-increase.stderr @@ -6,7 +6,7 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `u8` (8 bits) = note: target type: `[u8; 2]` (16 bits) - = note: this error originates in the macro `$crate::assert_size_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0658]: mutable references are not allowed in constants --> tests/ui-msrv/transmute-mut-size-increase.rs:17:52 diff --git a/tests/ui-msrv/transmute-mut-src-dst-generic.stderr b/tests/ui-msrv/transmute-mut-src-dst-generic.stderr index f41be15ad3..8c4dba2ad3 100644 --- a/tests/ui-msrv/transmute-mut-src-dst-generic.stderr +++ b/tests/ui-msrv/transmute-mut-src-dst-generic.stderr @@ -6,7 +6,7 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `T` (this type does not have a fixed size) = note: target type: `U` (this type does not have a fixed size) - = note: this error originates in the macro `$crate::assert_size_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0512]: cannot transmute between types of different sizes, or dependently-sized types --> tests/ui-msrv/transmute-mut-src-dst-generic.rs:20:5 @@ -16,4 +16,4 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `AlignOf` (size can vary because of T) = note: target type: `MaxAlignsOf` (size can vary because of T) - = note: this error originates in the macro `$crate::assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui-msrv/transmute-mut-src-dst-unsized.stderr b/tests/ui-msrv/transmute-mut-src-dst-unsized.stderr index 81f11d0376..9c744ca2c9 100644 --- a/tests/ui-msrv/transmute-mut-src-dst-unsized.stderr +++ b/tests/ui-msrv/transmute-mut-src-dst-unsized.stderr @@ -63,7 +63,7 @@ note: required by a bound in `transmute` | | pub fn transmute(e: T) -> U; | ^ required by this bound in `transmute` - = note: this error originates in the macro `$crate::assert_size_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-msrv/transmute-mut-src-dst-unsized.rs:17:36 @@ -72,7 +72,7 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | = help: the trait `Sized` is not implemented for `[u8]` - = note: this error originates in the macro `$crate::assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-msrv/transmute-mut-src-dst-unsized.rs:17:36 @@ -82,7 +82,7 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation | = help: the trait `Sized` is not implemented for `[u8]` = note: the left-hand-side of an assignment must have a statically known size - = note: this error originates in the macro `$crate::assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-msrv/transmute-mut-src-dst-unsized.rs:17:36 @@ -96,7 +96,7 @@ note: required by a bound in `AlignOf` | | pub struct AlignOf { | ^ required by this bound in `AlignOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-msrv/transmute-mut-src-dst-unsized.rs:17:36 @@ -110,7 +110,7 @@ note: required by `MaxAlignsOf::::new` | | pub fn new(_t: T, _u: U) -> MaxAlignsOf { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: this error originates in the macro `$crate::assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-msrv/transmute-mut-src-dst-unsized.rs:17:36 @@ -124,7 +124,7 @@ note: required by a bound in `MaxAlignsOf` | | pub union MaxAlignsOf { | ^ required by this bound in `MaxAlignsOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-msrv/transmute-mut-src-dst-unsized.rs:17:36 @@ -138,7 +138,7 @@ note: required by a bound in `MaxAlignsOf` | | pub union MaxAlignsOf { | ^ required by this bound in `MaxAlignsOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-msrv/transmute-mut-src-dst-unsized.rs:17:36 @@ -152,7 +152,7 @@ note: required by a bound in `AlignOf` | | pub struct AlignOf { | ^ required by this bound in `AlignOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-msrv/transmute-mut-src-dst-unsized.rs:17:36 @@ -166,7 +166,7 @@ note: required by a bound in `MaxAlignsOf` | | pub union MaxAlignsOf { | ^ required by this bound in `MaxAlignsOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-msrv/transmute-mut-src-dst-unsized.rs:17:36 @@ -191,7 +191,7 @@ note: required by a bound in `transmute` | | pub fn transmute(e: T) -> U; | ^ required by this bound in `transmute` - = note: this error originates in the macro `$crate::assert_size_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-msrv/transmute-mut-src-dst-unsized.rs:17:36 diff --git a/tests/ui-msrv/transmute-mut-src-generic.stderr b/tests/ui-msrv/transmute-mut-src-generic.stderr index 319fc27a8b..421d982cf8 100644 --- a/tests/ui-msrv/transmute-mut-src-generic.stderr +++ b/tests/ui-msrv/transmute-mut-src-generic.stderr @@ -6,7 +6,7 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `T` (this type does not have a fixed size) = note: target type: `u8` (8 bits) - = note: this error originates in the macro `$crate::assert_size_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0512]: cannot transmute between types of different sizes, or dependently-sized types --> tests/ui-msrv/transmute-mut-src-generic.rs:17:5 @@ -16,4 +16,4 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `AlignOf` (size can vary because of T) = note: target type: `MaxAlignsOf` (size can vary because of T) - = note: this error originates in the macro `$crate::assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui-msrv/transmute-mut-src-unsized.stderr b/tests/ui-msrv/transmute-mut-src-unsized.stderr index dcdfd9d53c..dda524b3ed 100644 --- a/tests/ui-msrv/transmute-mut-src-unsized.stderr +++ b/tests/ui-msrv/transmute-mut-src-unsized.stderr @@ -49,7 +49,7 @@ note: required by a bound in `transmute` | | pub fn transmute(e: T) -> U; | ^ required by this bound in `transmute` - = note: this error originates in the macro `$crate::assert_size_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-msrv/transmute-mut-src-unsized.rs:16:35 @@ -58,7 +58,7 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | = help: the trait `Sized` is not implemented for `[u8]` - = note: this error originates in the macro `$crate::assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-msrv/transmute-mut-src-unsized.rs:16:35 @@ -68,7 +68,7 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation | = help: the trait `Sized` is not implemented for `[u8]` = note: the left-hand-side of an assignment must have a statically known size - = note: this error originates in the macro `$crate::assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-msrv/transmute-mut-src-unsized.rs:16:35 @@ -82,7 +82,7 @@ note: required by a bound in `AlignOf` | | pub struct AlignOf { | ^ required by this bound in `AlignOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-msrv/transmute-mut-src-unsized.rs:16:35 @@ -96,7 +96,7 @@ note: required by `MaxAlignsOf::::new` | | pub fn new(_t: T, _u: U) -> MaxAlignsOf { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: this error originates in the macro `$crate::assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-msrv/transmute-mut-src-unsized.rs:16:35 @@ -110,7 +110,7 @@ note: required by a bound in `MaxAlignsOf` | | pub union MaxAlignsOf { | ^ required by this bound in `MaxAlignsOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-msrv/transmute-mut-src-unsized.rs:16:35 @@ -124,7 +124,7 @@ note: required by a bound in `MaxAlignsOf` | | pub union MaxAlignsOf { | ^ required by this bound in `MaxAlignsOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-msrv/transmute-mut-src-unsized.rs:16:35 @@ -138,7 +138,7 @@ note: required by a bound in `AlignOf` | | pub struct AlignOf { | ^ required by this bound in `AlignOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-msrv/transmute-mut-src-unsized.rs:16:35 @@ -152,7 +152,7 @@ note: required by a bound in `MaxAlignsOf` | | pub union MaxAlignsOf { | ^ required by this bound in `MaxAlignsOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-msrv/transmute-mut-src-unsized.rs:16:35 @@ -176,4 +176,4 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation | = help: the trait `Sized` is not implemented for `[u8]` = note: all function arguments must have a statically known size - = note: this error originates in the macro `$crate::assert_size_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui-msrv/transmute-ref-alignment-increase.stderr b/tests/ui-msrv/transmute-ref-alignment-increase.stderr index bbf5058287..b5b73eff6a 100644 --- a/tests/ui-msrv/transmute-ref-alignment-increase.stderr +++ b/tests/ui-msrv/transmute-ref-alignment-increase.stderr @@ -6,4 +6,4 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `AlignOf<[u8; 2]>` (8 bits) = note: target type: `MaxAlignsOf<[u8; 2], AU16>` (16 bits) - = note: this error originates in the macro `$crate::assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui-msrv/transmute-ref-dst-generic.stderr b/tests/ui-msrv/transmute-ref-dst-generic.stderr index ec7ec74894..7376e848ad 100644 --- a/tests/ui-msrv/transmute-ref-dst-generic.stderr +++ b/tests/ui-msrv/transmute-ref-dst-generic.stderr @@ -6,7 +6,7 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `u8` (8 bits) = note: target type: `T` (this type does not have a fixed size) - = note: this error originates in the macro `$crate::assert_size_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0512]: cannot transmute between types of different sizes, or dependently-sized types --> tests/ui-msrv/transmute-ref-dst-generic.rs:17:5 @@ -16,4 +16,4 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `AlignOf` (8 bits) = note: target type: `MaxAlignsOf` (size can vary because of T) - = note: this error originates in the macro `$crate::assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui-msrv/transmute-ref-dst-unsized.stderr b/tests/ui-msrv/transmute-ref-dst-unsized.stderr index 32fd0286a3..17c9b22c30 100644 --- a/tests/ui-msrv/transmute-ref-dst-unsized.stderr +++ b/tests/ui-msrv/transmute-ref-dst-unsized.stderr @@ -35,7 +35,7 @@ note: required by a bound in `MaxAlignsOf` | | pub union MaxAlignsOf { | ^ required by this bound in `MaxAlignsOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-msrv/transmute-ref-dst-unsized.rs:17:28 @@ -49,7 +49,7 @@ note: required by a bound in `transmute` | | pub fn transmute(e: T) -> U; | ^ required by this bound in `transmute` - = note: this error originates in the macro `$crate::assert_size_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-msrv/transmute-ref-dst-unsized.rs:17:28 @@ -63,7 +63,7 @@ note: required by `MaxAlignsOf::::new` | | pub fn new(_t: T, _u: U) -> MaxAlignsOf { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: this error originates in the macro `$crate::assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-msrv/transmute-ref-dst-unsized.rs:17:28 @@ -77,7 +77,7 @@ note: required by a bound in `MaxAlignsOf` | | pub union MaxAlignsOf { | ^ required by this bound in `MaxAlignsOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-msrv/transmute-ref-dst-unsized.rs:17:28 diff --git a/tests/ui-msrv/transmute-ref-size-decrease.stderr b/tests/ui-msrv/transmute-ref-size-decrease.stderr index 95669f9063..77988fdcee 100644 --- a/tests/ui-msrv/transmute-ref-size-decrease.stderr +++ b/tests/ui-msrv/transmute-ref-size-decrease.stderr @@ -6,4 +6,4 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `[u8; 2]` (16 bits) = note: target type: `u8` (8 bits) - = note: this error originates in the macro `$crate::assert_size_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui-msrv/transmute-ref-size-increase.stderr b/tests/ui-msrv/transmute-ref-size-increase.stderr index 10f0e1038c..c5ef0d06a1 100644 --- a/tests/ui-msrv/transmute-ref-size-increase.stderr +++ b/tests/ui-msrv/transmute-ref-size-increase.stderr @@ -6,4 +6,4 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `u8` (8 bits) = note: target type: `[u8; 2]` (16 bits) - = note: this error originates in the macro `$crate::assert_size_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui-msrv/transmute-ref-src-dst-generic.stderr b/tests/ui-msrv/transmute-ref-src-dst-generic.stderr index eb3268fa8f..d2514e8fee 100644 --- a/tests/ui-msrv/transmute-ref-src-dst-generic.stderr +++ b/tests/ui-msrv/transmute-ref-src-dst-generic.stderr @@ -6,7 +6,7 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `T` (this type does not have a fixed size) = note: target type: `U` (this type does not have a fixed size) - = note: this error originates in the macro `$crate::assert_size_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0512]: cannot transmute between types of different sizes, or dependently-sized types --> tests/ui-msrv/transmute-ref-src-dst-generic.rs:18:5 @@ -16,4 +16,4 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `AlignOf` (size can vary because of T) = note: target type: `MaxAlignsOf` (size can vary because of T) - = note: this error originates in the macro `$crate::assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui-msrv/transmute-ref-src-dst-unsized.stderr b/tests/ui-msrv/transmute-ref-src-dst-unsized.stderr index 77c833386b..24cbd80cfe 100644 --- a/tests/ui-msrv/transmute-ref-src-dst-unsized.stderr +++ b/tests/ui-msrv/transmute-ref-src-dst-unsized.stderr @@ -63,7 +63,7 @@ note: required by a bound in `transmute` | | pub fn transmute(e: T) -> U; | ^ required by this bound in `transmute` - = note: this error originates in the macro `$crate::assert_size_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-msrv/transmute-ref-src-dst-unsized.rs:17:32 @@ -72,7 +72,7 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation | ^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | = help: the trait `Sized` is not implemented for `[u8]` - = note: this error originates in the macro `$crate::assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-msrv/transmute-ref-src-dst-unsized.rs:17:32 @@ -82,7 +82,7 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation | = help: the trait `Sized` is not implemented for `[u8]` = note: the left-hand-side of an assignment must have a statically known size - = note: this error originates in the macro `$crate::assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-msrv/transmute-ref-src-dst-unsized.rs:17:32 @@ -96,7 +96,7 @@ note: required by a bound in `AlignOf` | | pub struct AlignOf { | ^ required by this bound in `AlignOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-msrv/transmute-ref-src-dst-unsized.rs:17:32 @@ -110,7 +110,7 @@ note: required by `MaxAlignsOf::::new` | | pub fn new(_t: T, _u: U) -> MaxAlignsOf { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: this error originates in the macro `$crate::assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-msrv/transmute-ref-src-dst-unsized.rs:17:32 @@ -124,7 +124,7 @@ note: required by a bound in `MaxAlignsOf` | | pub union MaxAlignsOf { | ^ required by this bound in `MaxAlignsOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-msrv/transmute-ref-src-dst-unsized.rs:17:32 @@ -138,7 +138,7 @@ note: required by a bound in `MaxAlignsOf` | | pub union MaxAlignsOf { | ^ required by this bound in `MaxAlignsOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-msrv/transmute-ref-src-dst-unsized.rs:17:32 @@ -152,7 +152,7 @@ note: required by a bound in `AlignOf` | | pub struct AlignOf { | ^ required by this bound in `AlignOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-msrv/transmute-ref-src-dst-unsized.rs:17:32 @@ -166,7 +166,7 @@ note: required by a bound in `MaxAlignsOf` | | pub union MaxAlignsOf { | ^ required by this bound in `MaxAlignsOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-msrv/transmute-ref-src-dst-unsized.rs:17:32 @@ -191,7 +191,7 @@ note: required by a bound in `transmute` | | pub fn transmute(e: T) -> U; | ^ required by this bound in `transmute` - = note: this error originates in the macro `$crate::assert_size_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-msrv/transmute-ref-src-dst-unsized.rs:17:32 diff --git a/tests/ui-msrv/transmute-ref-src-generic.stderr b/tests/ui-msrv/transmute-ref-src-generic.stderr index 4cb3e51bc7..4141049a78 100644 --- a/tests/ui-msrv/transmute-ref-src-generic.stderr +++ b/tests/ui-msrv/transmute-ref-src-generic.stderr @@ -6,7 +6,7 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `T` (this type does not have a fixed size) = note: target type: `u8` (8 bits) - = note: this error originates in the macro `$crate::assert_size_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0512]: cannot transmute between types of different sizes, or dependently-sized types --> tests/ui-msrv/transmute-ref-src-generic.rs:17:5 @@ -16,4 +16,4 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `AlignOf` (size can vary because of T) = note: target type: `MaxAlignsOf` (size can vary because of T) - = note: this error originates in the macro `$crate::assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui-msrv/transmute-ref-src-unsized.stderr b/tests/ui-msrv/transmute-ref-src-unsized.stderr index 1621797c12..4660647323 100644 --- a/tests/ui-msrv/transmute-ref-src-unsized.stderr +++ b/tests/ui-msrv/transmute-ref-src-unsized.stderr @@ -49,7 +49,7 @@ note: required by a bound in `transmute` | | pub fn transmute(e: T) -> U; | ^ required by this bound in `transmute` - = note: this error originates in the macro `$crate::assert_size_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-msrv/transmute-ref-src-unsized.rs:16:31 @@ -58,7 +58,7 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation | ^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | = help: the trait `Sized` is not implemented for `[u8]` - = note: this error originates in the macro `$crate::assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-msrv/transmute-ref-src-unsized.rs:16:31 @@ -68,7 +68,7 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation | = help: the trait `Sized` is not implemented for `[u8]` = note: the left-hand-side of an assignment must have a statically known size - = note: this error originates in the macro `$crate::assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-msrv/transmute-ref-src-unsized.rs:16:31 @@ -82,7 +82,7 @@ note: required by a bound in `AlignOf` | | pub struct AlignOf { | ^ required by this bound in `AlignOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-msrv/transmute-ref-src-unsized.rs:16:31 @@ -96,7 +96,7 @@ note: required by `MaxAlignsOf::::new` | | pub fn new(_t: T, _u: U) -> MaxAlignsOf { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: this error originates in the macro `$crate::assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-msrv/transmute-ref-src-unsized.rs:16:31 @@ -110,7 +110,7 @@ note: required by a bound in `MaxAlignsOf` | | pub union MaxAlignsOf { | ^ required by this bound in `MaxAlignsOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-msrv/transmute-ref-src-unsized.rs:16:31 @@ -124,7 +124,7 @@ note: required by a bound in `MaxAlignsOf` | | pub union MaxAlignsOf { | ^ required by this bound in `MaxAlignsOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-msrv/transmute-ref-src-unsized.rs:16:31 @@ -138,7 +138,7 @@ note: required by a bound in `AlignOf` | | pub struct AlignOf { | ^ required by this bound in `AlignOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-msrv/transmute-ref-src-unsized.rs:16:31 @@ -152,7 +152,7 @@ note: required by a bound in `MaxAlignsOf` | | pub union MaxAlignsOf { | ^ required by this bound in `MaxAlignsOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-msrv/transmute-ref-src-unsized.rs:16:31 @@ -176,4 +176,4 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation | = help: the trait `Sized` is not implemented for `[u8]` = note: all function arguments must have a statically known size - = note: this error originates in the macro `$crate::assert_size_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui-nightly/transmute-mut-alignment-increase.stderr b/tests/ui-nightly/transmute-mut-alignment-increase.stderr index e0b418058f..e796eaf49e 100644 --- a/tests/ui-nightly/transmute-mut-alignment-increase.stderr +++ b/tests/ui-nightly/transmute-mut-alignment-increase.stderr @@ -6,4 +6,4 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `AlignOf<[u8; 2]>` (8 bits) = note: target type: `MaxAlignsOf<[u8; 2], AU16>` (16 bits) - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui-nightly/transmute-mut-dst-generic.stderr b/tests/ui-nightly/transmute-mut-dst-generic.stderr index f278558cf8..f1ba6ea62e 100644 --- a/tests/ui-nightly/transmute-mut-dst-generic.stderr +++ b/tests/ui-nightly/transmute-mut-dst-generic.stderr @@ -6,7 +6,7 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `u8` (8 bits) = note: target type: `T` (this type does not have a fixed size) - = note: this error originates in the macro `$crate::assert_size_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0512]: cannot transmute between types of different sizes, or dependently-sized types --> tests/ui-nightly/transmute-mut-dst-generic.rs:17:5 @@ -16,4 +16,4 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `AlignOf` (8 bits) = note: target type: `MaxAlignsOf` (size can vary because of T) - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui-nightly/transmute-mut-dst-unsized.stderr b/tests/ui-nightly/transmute-mut-dst-unsized.stderr index 2b918ca252..2d9c1d0347 100644 --- a/tests/ui-nightly/transmute-mut-dst-unsized.stderr +++ b/tests/ui-nightly/transmute-mut-dst-unsized.stderr @@ -38,7 +38,7 @@ note: required by an implicit `Sized` bound in `MaxAlignsOf` | | pub union MaxAlignsOf { | ^ required by the implicit `Sized` requirement on this type parameter in `MaxAlignsOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-nightly/transmute-mut-dst-unsized.rs:17:32 @@ -52,7 +52,7 @@ note: required by an implicit `Sized` bound in `transmute` | | pub fn transmute(src: Src) -> Dst; | ^^^ required by the implicit `Sized` requirement on this type parameter in `transmute` - = note: this error originates in the macro `$crate::assert_size_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-nightly/transmute-mut-dst-unsized.rs:17:32 diff --git a/tests/ui-nightly/transmute-mut-size-decrease.stderr b/tests/ui-nightly/transmute-mut-size-decrease.stderr index ac1e35cec7..e4f26e7fbc 100644 --- a/tests/ui-nightly/transmute-mut-size-decrease.stderr +++ b/tests/ui-nightly/transmute-mut-size-decrease.stderr @@ -6,4 +6,4 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `[u8; 2]` (16 bits) = note: target type: `u8` (8 bits) - = note: this error originates in the macro `$crate::assert_size_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui-nightly/transmute-mut-size-increase.stderr b/tests/ui-nightly/transmute-mut-size-increase.stderr index d343bd65e6..1bf0004170 100644 --- a/tests/ui-nightly/transmute-mut-size-increase.stderr +++ b/tests/ui-nightly/transmute-mut-size-increase.stderr @@ -6,4 +6,4 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `u8` (8 bits) = note: target type: `[u8; 2]` (16 bits) - = note: this error originates in the macro `$crate::assert_size_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui-nightly/transmute-mut-src-dst-generic.stderr b/tests/ui-nightly/transmute-mut-src-dst-generic.stderr index eb5c498cec..33917850ac 100644 --- a/tests/ui-nightly/transmute-mut-src-dst-generic.stderr +++ b/tests/ui-nightly/transmute-mut-src-dst-generic.stderr @@ -6,7 +6,7 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `T` (this type does not have a fixed size) = note: target type: `U` (this type does not have a fixed size) - = note: this error originates in the macro `$crate::assert_size_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0512]: cannot transmute between types of different sizes, or dependently-sized types --> tests/ui-nightly/transmute-mut-src-dst-generic.rs:20:5 @@ -16,4 +16,4 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `AlignOf` (size can vary because of T) = note: target type: `MaxAlignsOf` (size can vary because of T) - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui-nightly/transmute-mut-src-dst-not-references.stderr b/tests/ui-nightly/transmute-mut-src-dst-not-references.stderr index df3cf2dba0..190f8238e3 100644 --- a/tests/ui-nightly/transmute-mut-src-dst-not-references.stderr +++ b/tests/ui-nightly/transmute-mut-src-dst-not-references.stderr @@ -13,3 +13,19 @@ help: consider mutably borrowing here | 17 | const SRC_DST_NOT_REFERENCES: &mut usize = transmute_mut!(&mut 0usize); | ++++ + +error: never type fallback affects this call to an `unsafe` function + --> tests/ui-nightly/transmute-mut-src-dst-not-references.rs:17:44 + | +17 | const SRC_DST_NOT_REFERENCES: &mut usize = transmute_mut!(0usize); + | ^^^^^^^^^^^^^^^^^^^^^^ + | + = warning: this will change its meaning in a future release! + = note: for more information, see issue #123748 + = help: specify the type explicitly +note: the lint level is defined here + --> tests/ui-nightly/transmute-mut-src-dst-not-references.rs:17:44 + | +17 | const SRC_DST_NOT_REFERENCES: &mut usize = transmute_mut!(0usize); + | ^^^^^^^^^^^^^^^^^^^^^^ + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui-nightly/transmute-mut-src-dst-unsized.stderr b/tests/ui-nightly/transmute-mut-src-dst-unsized.stderr index 5aa4e8b7d4..ad5e985961 100644 --- a/tests/ui-nightly/transmute-mut-src-dst-unsized.stderr +++ b/tests/ui-nightly/transmute-mut-src-dst-unsized.stderr @@ -72,7 +72,7 @@ note: required by a bound in `AlignOf::::into_t` ... | pub fn into_t(self) -> T { | ------ required by a bound in this associated function - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-nightly/transmute-mut-src-dst-unsized.rs:17:36 @@ -82,7 +82,7 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation | = help: the trait `Sized` is not implemented for `[u8]` = note: the left-hand-side of an assignment must have a statically known size - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-nightly/transmute-mut-src-dst-unsized.rs:17:36 @@ -96,7 +96,7 @@ note: required by an implicit `Sized` bound in `AlignOf` | | pub struct AlignOf { | ^ required by the implicit `Sized` requirement on this type parameter in `AlignOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-nightly/transmute-mut-src-dst-unsized.rs:17:36 @@ -110,7 +110,7 @@ note: required by an implicit `Sized` bound in `MaxAlignsOf` | | pub union MaxAlignsOf { | ^ required by the implicit `Sized` requirement on this type parameter in `MaxAlignsOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-nightly/transmute-mut-src-dst-unsized.rs:17:36 @@ -124,7 +124,7 @@ note: required by an implicit `Sized` bound in `AlignOf` | | pub struct AlignOf { | ^ required by the implicit `Sized` requirement on this type parameter in `AlignOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-nightly/transmute-mut-src-dst-unsized.rs:17:36 @@ -149,7 +149,7 @@ note: required by an implicit `Sized` bound in `transmute` | | pub fn transmute(src: Src) -> Dst; | ^^^ required by the implicit `Sized` requirement on this type parameter in `transmute` - = note: this error originates in the macro `$crate::assert_size_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-nightly/transmute-mut-src-dst-unsized.rs:17:36 diff --git a/tests/ui-nightly/transmute-mut-src-generic.stderr b/tests/ui-nightly/transmute-mut-src-generic.stderr index 26b185639d..00f77ac6e1 100644 --- a/tests/ui-nightly/transmute-mut-src-generic.stderr +++ b/tests/ui-nightly/transmute-mut-src-generic.stderr @@ -6,7 +6,7 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `T` (this type does not have a fixed size) = note: target type: `u8` (8 bits) - = note: this error originates in the macro `$crate::assert_size_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0512]: cannot transmute between types of different sizes, or dependently-sized types --> tests/ui-nightly/transmute-mut-src-generic.rs:17:5 @@ -16,4 +16,4 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `AlignOf` (size can vary because of T) = note: target type: `MaxAlignsOf` (size can vary because of T) - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui-nightly/transmute-mut-src-immutable.stderr b/tests/ui-nightly/transmute-mut-src-immutable.stderr index 7b7969d5d5..979d5e072e 100644 --- a/tests/ui-nightly/transmute-mut-src-immutable.stderr +++ b/tests/ui-nightly/transmute-mut-src-immutable.stderr @@ -9,3 +9,19 @@ error[E0308]: mismatched types | = note: expected mutable reference `&mut _` found reference `&u8` + +error: never type fallback affects this call to an `unsafe` function + --> tests/ui-nightly/transmute-mut-src-immutable.rs:17:22 + | +17 | let _: &mut u8 = transmute_mut!(&0u8); + | ^^^^^^^^^^^^^^^^^^^^ + | + = warning: this will change its meaning in a future release! + = note: for more information, see issue #123748 + = help: specify the type explicitly +note: the lint level is defined here + --> tests/ui-nightly/transmute-mut-src-immutable.rs:17:22 + | +17 | let _: &mut u8 = transmute_mut!(&0u8); + | ^^^^^^^^^^^^^^^^^^^^ + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui-nightly/transmute-mut-src-not-a-reference.stderr b/tests/ui-nightly/transmute-mut-src-not-a-reference.stderr index 12b7674f0e..d908d9616a 100644 --- a/tests/ui-nightly/transmute-mut-src-not-a-reference.stderr +++ b/tests/ui-nightly/transmute-mut-src-not-a-reference.stderr @@ -13,3 +13,19 @@ help: consider mutably borrowing here | 17 | const SRC_NOT_A_REFERENCE: &mut u8 = transmute_mut!(&mut 0usize); | ++++ + +error: never type fallback affects this call to an `unsafe` function + --> tests/ui-nightly/transmute-mut-src-not-a-reference.rs:17:38 + | +17 | const SRC_NOT_A_REFERENCE: &mut u8 = transmute_mut!(0usize); + | ^^^^^^^^^^^^^^^^^^^^^^ + | + = warning: this will change its meaning in a future release! + = note: for more information, see issue #123748 + = help: specify the type explicitly +note: the lint level is defined here + --> tests/ui-nightly/transmute-mut-src-not-a-reference.rs:17:38 + | +17 | const SRC_NOT_A_REFERENCE: &mut u8 = transmute_mut!(0usize); + | ^^^^^^^^^^^^^^^^^^^^^^ + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui-nightly/transmute-mut-src-unsized.stderr b/tests/ui-nightly/transmute-mut-src-unsized.stderr index 531c9ac194..81412a8a78 100644 --- a/tests/ui-nightly/transmute-mut-src-unsized.stderr +++ b/tests/ui-nightly/transmute-mut-src-unsized.stderr @@ -55,7 +55,7 @@ note: required by a bound in `AlignOf::::into_t` ... | pub fn into_t(self) -> T { | ------ required by a bound in this associated function - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-nightly/transmute-mut-src-unsized.rs:16:35 @@ -65,7 +65,7 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation | = help: the trait `Sized` is not implemented for `[u8]` = note: the left-hand-side of an assignment must have a statically known size - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-nightly/transmute-mut-src-unsized.rs:16:35 @@ -79,7 +79,7 @@ note: required by an implicit `Sized` bound in `AlignOf` | | pub struct AlignOf { | ^ required by the implicit `Sized` requirement on this type parameter in `AlignOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-nightly/transmute-mut-src-unsized.rs:16:35 @@ -93,7 +93,7 @@ note: required by an implicit `Sized` bound in `MaxAlignsOf` | | pub union MaxAlignsOf { | ^ required by the implicit `Sized` requirement on this type parameter in `MaxAlignsOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-nightly/transmute-mut-src-unsized.rs:16:35 @@ -107,7 +107,7 @@ note: required by an implicit `Sized` bound in `AlignOf` | | pub struct AlignOf { | ^ required by the implicit `Sized` requirement on this type parameter in `AlignOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-nightly/transmute-mut-src-unsized.rs:16:35 diff --git a/tests/ui-nightly/transmute-ref-alignment-increase.stderr b/tests/ui-nightly/transmute-ref-alignment-increase.stderr index 30fabe5a66..6c00f750fb 100644 --- a/tests/ui-nightly/transmute-ref-alignment-increase.stderr +++ b/tests/ui-nightly/transmute-ref-alignment-increase.stderr @@ -6,4 +6,4 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `AlignOf<[u8; 2]>` (8 bits) = note: target type: `MaxAlignsOf<[u8; 2], AU16>` (16 bits) - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui-nightly/transmute-ref-dst-generic.stderr b/tests/ui-nightly/transmute-ref-dst-generic.stderr index 4c94d501c2..66e07524a9 100644 --- a/tests/ui-nightly/transmute-ref-dst-generic.stderr +++ b/tests/ui-nightly/transmute-ref-dst-generic.stderr @@ -6,7 +6,7 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `u8` (8 bits) = note: target type: `T` (this type does not have a fixed size) - = note: this error originates in the macro `$crate::assert_size_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0512]: cannot transmute between types of different sizes, or dependently-sized types --> tests/ui-nightly/transmute-ref-dst-generic.rs:17:5 @@ -16,4 +16,4 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `AlignOf` (8 bits) = note: target type: `MaxAlignsOf` (size can vary because of T) - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui-nightly/transmute-ref-dst-unsized.stderr b/tests/ui-nightly/transmute-ref-dst-unsized.stderr index 20a7b97dca..388a02f647 100644 --- a/tests/ui-nightly/transmute-ref-dst-unsized.stderr +++ b/tests/ui-nightly/transmute-ref-dst-unsized.stderr @@ -38,7 +38,7 @@ note: required by an implicit `Sized` bound in `MaxAlignsOf` | | pub union MaxAlignsOf { | ^ required by the implicit `Sized` requirement on this type parameter in `MaxAlignsOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-nightly/transmute-ref-dst-unsized.rs:17:28 @@ -52,7 +52,7 @@ note: required by an implicit `Sized` bound in `transmute` | | pub fn transmute(src: Src) -> Dst; | ^^^ required by the implicit `Sized` requirement on this type parameter in `transmute` - = note: this error originates in the macro `$crate::assert_size_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-nightly/transmute-ref-dst-unsized.rs:17:28 diff --git a/tests/ui-nightly/transmute-ref-size-decrease.stderr b/tests/ui-nightly/transmute-ref-size-decrease.stderr index 793ecc54c0..829207f3cf 100644 --- a/tests/ui-nightly/transmute-ref-size-decrease.stderr +++ b/tests/ui-nightly/transmute-ref-size-decrease.stderr @@ -6,4 +6,4 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `[u8; 2]` (16 bits) = note: target type: `u8` (8 bits) - = note: this error originates in the macro `$crate::assert_size_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui-nightly/transmute-ref-size-increase.stderr b/tests/ui-nightly/transmute-ref-size-increase.stderr index 40c69f63c4..d7e4756c85 100644 --- a/tests/ui-nightly/transmute-ref-size-increase.stderr +++ b/tests/ui-nightly/transmute-ref-size-increase.stderr @@ -6,4 +6,4 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `u8` (8 bits) = note: target type: `[u8; 2]` (16 bits) - = note: this error originates in the macro `$crate::assert_size_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui-nightly/transmute-ref-src-dst-generic.stderr b/tests/ui-nightly/transmute-ref-src-dst-generic.stderr index 6a3a4fd95b..c34c34fb9e 100644 --- a/tests/ui-nightly/transmute-ref-src-dst-generic.stderr +++ b/tests/ui-nightly/transmute-ref-src-dst-generic.stderr @@ -6,7 +6,7 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `T` (this type does not have a fixed size) = note: target type: `U` (this type does not have a fixed size) - = note: this error originates in the macro `$crate::assert_size_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0512]: cannot transmute between types of different sizes, or dependently-sized types --> tests/ui-nightly/transmute-ref-src-dst-generic.rs:18:5 @@ -16,4 +16,4 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `AlignOf` (size can vary because of T) = note: target type: `MaxAlignsOf` (size can vary because of T) - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui-nightly/transmute-ref-src-dst-not-references.stderr b/tests/ui-nightly/transmute-ref-src-dst-not-references.stderr index bd02f80a27..d41018157b 100644 --- a/tests/ui-nightly/transmute-ref-src-dst-not-references.stderr +++ b/tests/ui-nightly/transmute-ref-src-dst-not-references.stderr @@ -76,3 +76,30 @@ note: function defined here | pub const fn must_use(t: T) -> T { | ^^^^^^^^ = note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: never type fallback affects this call to an `unsafe` function + --> tests/ui-nightly/transmute-ref-src-dst-not-references.rs:17:39 + | +17 | const SRC_DST_NOT_REFERENCES: usize = transmute_ref!(0usize); + | ^^^^^^^^^^^^^^^^^^^^^^ + | + = warning: this will change its meaning in a future release! + = note: for more information, see issue #123748 + = help: specify the type explicitly +note: the lint level is defined here + --> tests/ui-nightly/transmute-ref-src-dst-not-references.rs:17:39 + | +17 | const SRC_DST_NOT_REFERENCES: usize = transmute_ref!(0usize); + | ^^^^^^^^^^^^^^^^^^^^^^ + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: never type fallback affects this call to an `unsafe` function + --> tests/ui-nightly/transmute-ref-src-dst-not-references.rs:17:39 + | +17 | const SRC_DST_NOT_REFERENCES: usize = transmute_ref!(0usize); + | ^^^^^^^^^^^^^^^^^^^^^^ + | + = warning: this will change its meaning in a future release! + = note: for more information, see issue #123748 + = help: specify the type explicitly + = note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui-nightly/transmute-ref-src-dst-unsized.stderr b/tests/ui-nightly/transmute-ref-src-dst-unsized.stderr index 4eabab072d..ea9a126d93 100644 --- a/tests/ui-nightly/transmute-ref-src-dst-unsized.stderr +++ b/tests/ui-nightly/transmute-ref-src-dst-unsized.stderr @@ -72,7 +72,7 @@ note: required by a bound in `AlignOf::::into_t` ... | pub fn into_t(self) -> T { | ------ required by a bound in this associated function - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-nightly/transmute-ref-src-dst-unsized.rs:17:32 @@ -82,7 +82,7 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation | = help: the trait `Sized` is not implemented for `[u8]` = note: the left-hand-side of an assignment must have a statically known size - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-nightly/transmute-ref-src-dst-unsized.rs:17:32 @@ -96,7 +96,7 @@ note: required by an implicit `Sized` bound in `AlignOf` | | pub struct AlignOf { | ^ required by the implicit `Sized` requirement on this type parameter in `AlignOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-nightly/transmute-ref-src-dst-unsized.rs:17:32 @@ -110,7 +110,7 @@ note: required by an implicit `Sized` bound in `MaxAlignsOf` | | pub union MaxAlignsOf { | ^ required by the implicit `Sized` requirement on this type parameter in `MaxAlignsOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-nightly/transmute-ref-src-dst-unsized.rs:17:32 @@ -124,7 +124,7 @@ note: required by an implicit `Sized` bound in `AlignOf` | | pub struct AlignOf { | ^ required by the implicit `Sized` requirement on this type parameter in `AlignOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-nightly/transmute-ref-src-dst-unsized.rs:17:32 @@ -149,7 +149,7 @@ note: required by an implicit `Sized` bound in `transmute` | | pub fn transmute(src: Src) -> Dst; | ^^^ required by the implicit `Sized` requirement on this type parameter in `transmute` - = note: this error originates in the macro `$crate::assert_size_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-nightly/transmute-ref-src-dst-unsized.rs:17:32 diff --git a/tests/ui-nightly/transmute-ref-src-generic.stderr b/tests/ui-nightly/transmute-ref-src-generic.stderr index a168f44bb4..653f86037e 100644 --- a/tests/ui-nightly/transmute-ref-src-generic.stderr +++ b/tests/ui-nightly/transmute-ref-src-generic.stderr @@ -6,7 +6,7 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `T` (this type does not have a fixed size) = note: target type: `u8` (8 bits) - = note: this error originates in the macro `$crate::assert_size_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0512]: cannot transmute between types of different sizes, or dependently-sized types --> tests/ui-nightly/transmute-ref-src-generic.rs:17:5 @@ -16,4 +16,4 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `AlignOf` (size can vary because of T) = note: target type: `MaxAlignsOf` (size can vary because of T) - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui-nightly/transmute-ref-src-not-a-reference.stderr b/tests/ui-nightly/transmute-ref-src-not-a-reference.stderr index be477c6c5e..c0adaecca7 100644 --- a/tests/ui-nightly/transmute-ref-src-not-a-reference.stderr +++ b/tests/ui-nightly/transmute-ref-src-not-a-reference.stderr @@ -13,3 +13,30 @@ help: consider borrowing here | 17 | const SRC_NOT_A_REFERENCE: &u8 = transmute_ref!(&0usize); | + + +error: never type fallback affects this call to an `unsafe` function + --> tests/ui-nightly/transmute-ref-src-not-a-reference.rs:17:34 + | +17 | const SRC_NOT_A_REFERENCE: &u8 = transmute_ref!(0usize); + | ^^^^^^^^^^^^^^^^^^^^^^ + | + = warning: this will change its meaning in a future release! + = note: for more information, see issue #123748 + = help: specify the type explicitly +note: the lint level is defined here + --> tests/ui-nightly/transmute-ref-src-not-a-reference.rs:17:34 + | +17 | const SRC_NOT_A_REFERENCE: &u8 = transmute_ref!(0usize); + | ^^^^^^^^^^^^^^^^^^^^^^ + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: never type fallback affects this call to an `unsafe` function + --> tests/ui-nightly/transmute-ref-src-not-a-reference.rs:17:34 + | +17 | const SRC_NOT_A_REFERENCE: &u8 = transmute_ref!(0usize); + | ^^^^^^^^^^^^^^^^^^^^^^ + | + = warning: this will change its meaning in a future release! + = note: for more information, see issue #123748 + = help: specify the type explicitly + = note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui-nightly/transmute-ref-src-unsized.stderr b/tests/ui-nightly/transmute-ref-src-unsized.stderr index d63d8995ef..20dba2f4e9 100644 --- a/tests/ui-nightly/transmute-ref-src-unsized.stderr +++ b/tests/ui-nightly/transmute-ref-src-unsized.stderr @@ -55,7 +55,7 @@ note: required by a bound in `AlignOf::::into_t` ... | pub fn into_t(self) -> T { | ------ required by a bound in this associated function - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-nightly/transmute-ref-src-unsized.rs:16:31 @@ -65,7 +65,7 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation | = help: the trait `Sized` is not implemented for `[u8]` = note: the left-hand-side of an assignment must have a statically known size - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-nightly/transmute-ref-src-unsized.rs:16:31 @@ -79,7 +79,7 @@ note: required by an implicit `Sized` bound in `AlignOf` | | pub struct AlignOf { | ^ required by the implicit `Sized` requirement on this type parameter in `AlignOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-nightly/transmute-ref-src-unsized.rs:16:31 @@ -93,7 +93,7 @@ note: required by an implicit `Sized` bound in `MaxAlignsOf` | | pub union MaxAlignsOf { | ^ required by the implicit `Sized` requirement on this type parameter in `MaxAlignsOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-nightly/transmute-ref-src-unsized.rs:16:31 @@ -107,7 +107,7 @@ note: required by an implicit `Sized` bound in `AlignOf` | | pub struct AlignOf { | ^ required by the implicit `Sized` requirement on this type parameter in `AlignOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-nightly/transmute-ref-src-unsized.rs:16:31 diff --git a/tests/ui-stable/transmute-mut-alignment-increase.stderr b/tests/ui-stable/transmute-mut-alignment-increase.stderr index 2b02f27c90..319072b774 100644 --- a/tests/ui-stable/transmute-mut-alignment-increase.stderr +++ b/tests/ui-stable/transmute-mut-alignment-increase.stderr @@ -6,4 +6,4 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `AlignOf<[u8; 2]>` (8 bits) = note: target type: `MaxAlignsOf<[u8; 2], AU16>` (16 bits) - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui-stable/transmute-mut-dst-generic.stderr b/tests/ui-stable/transmute-mut-dst-generic.stderr index 0000eb0bab..22c4910427 100644 --- a/tests/ui-stable/transmute-mut-dst-generic.stderr +++ b/tests/ui-stable/transmute-mut-dst-generic.stderr @@ -6,7 +6,7 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `u8` (8 bits) = note: target type: `T` (this type does not have a fixed size) - = note: this error originates in the macro `$crate::assert_size_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0512]: cannot transmute between types of different sizes, or dependently-sized types --> tests/ui-stable/transmute-mut-dst-generic.rs:17:5 @@ -16,4 +16,4 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `AlignOf` (8 bits) = note: target type: `MaxAlignsOf` (size can vary because of T) - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui-stable/transmute-mut-dst-unsized.stderr b/tests/ui-stable/transmute-mut-dst-unsized.stderr index 54eb1e5d16..bd2c76ef4f 100644 --- a/tests/ui-stable/transmute-mut-dst-unsized.stderr +++ b/tests/ui-stable/transmute-mut-dst-unsized.stderr @@ -38,7 +38,7 @@ note: required by an implicit `Sized` bound in `MaxAlignsOf` | | pub union MaxAlignsOf { | ^ required by the implicit `Sized` requirement on this type parameter in `MaxAlignsOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-stable/transmute-mut-dst-unsized.rs:17:32 @@ -52,7 +52,7 @@ note: required by an implicit `Sized` bound in `transmute` | | pub fn transmute(src: Src) -> Dst; | ^^^ required by the implicit `Sized` requirement on this type parameter in `transmute` - = note: this error originates in the macro `$crate::assert_size_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-stable/transmute-mut-dst-unsized.rs:17:32 diff --git a/tests/ui-stable/transmute-mut-size-decrease.stderr b/tests/ui-stable/transmute-mut-size-decrease.stderr index 239991357d..50747f8394 100644 --- a/tests/ui-stable/transmute-mut-size-decrease.stderr +++ b/tests/ui-stable/transmute-mut-size-decrease.stderr @@ -6,4 +6,4 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `[u8; 2]` (16 bits) = note: target type: `u8` (8 bits) - = note: this error originates in the macro `$crate::assert_size_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui-stable/transmute-mut-size-increase.stderr b/tests/ui-stable/transmute-mut-size-increase.stderr index 1427c7b0e9..8efa42e5c3 100644 --- a/tests/ui-stable/transmute-mut-size-increase.stderr +++ b/tests/ui-stable/transmute-mut-size-increase.stderr @@ -6,4 +6,4 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `u8` (8 bits) = note: target type: `[u8; 2]` (16 bits) - = note: this error originates in the macro `$crate::assert_size_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui-stable/transmute-mut-src-dst-generic.stderr b/tests/ui-stable/transmute-mut-src-dst-generic.stderr index 2fd87ed86b..3b2dd6799d 100644 --- a/tests/ui-stable/transmute-mut-src-dst-generic.stderr +++ b/tests/ui-stable/transmute-mut-src-dst-generic.stderr @@ -6,7 +6,7 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `T` (this type does not have a fixed size) = note: target type: `U` (this type does not have a fixed size) - = note: this error originates in the macro `$crate::assert_size_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0512]: cannot transmute between types of different sizes, or dependently-sized types --> tests/ui-stable/transmute-mut-src-dst-generic.rs:20:5 @@ -16,4 +16,4 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `AlignOf` (size can vary because of T) = note: target type: `MaxAlignsOf` (size can vary because of T) - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui-stable/transmute-mut-src-dst-unsized.stderr b/tests/ui-stable/transmute-mut-src-dst-unsized.stderr index 9dfa44b029..b3b44c1d5a 100644 --- a/tests/ui-stable/transmute-mut-src-dst-unsized.stderr +++ b/tests/ui-stable/transmute-mut-src-dst-unsized.stderr @@ -72,7 +72,7 @@ note: required by a bound in `AlignOf::::into_t` ... | pub fn into_t(self) -> T { | ------ required by a bound in this associated function - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-stable/transmute-mut-src-dst-unsized.rs:17:36 @@ -82,7 +82,7 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation | = help: the trait `Sized` is not implemented for `[u8]` = note: the left-hand-side of an assignment must have a statically known size - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-stable/transmute-mut-src-dst-unsized.rs:17:36 @@ -96,7 +96,7 @@ note: required by an implicit `Sized` bound in `AlignOf` | | pub struct AlignOf { | ^ required by the implicit `Sized` requirement on this type parameter in `AlignOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-stable/transmute-mut-src-dst-unsized.rs:17:36 @@ -110,7 +110,7 @@ note: required by an implicit `Sized` bound in `MaxAlignsOf` | | pub union MaxAlignsOf { | ^ required by the implicit `Sized` requirement on this type parameter in `MaxAlignsOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-stable/transmute-mut-src-dst-unsized.rs:17:36 @@ -124,7 +124,7 @@ note: required by an implicit `Sized` bound in `AlignOf` | | pub struct AlignOf { | ^ required by the implicit `Sized` requirement on this type parameter in `AlignOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-stable/transmute-mut-src-dst-unsized.rs:17:36 @@ -149,7 +149,7 @@ note: required by an implicit `Sized` bound in `transmute` | | pub fn transmute(src: Src) -> Dst; | ^^^ required by the implicit `Sized` requirement on this type parameter in `transmute` - = note: this error originates in the macro `$crate::assert_size_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-stable/transmute-mut-src-dst-unsized.rs:17:36 diff --git a/tests/ui-stable/transmute-mut-src-generic.stderr b/tests/ui-stable/transmute-mut-src-generic.stderr index 400b0a8166..f920a73121 100644 --- a/tests/ui-stable/transmute-mut-src-generic.stderr +++ b/tests/ui-stable/transmute-mut-src-generic.stderr @@ -6,7 +6,7 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `T` (this type does not have a fixed size) = note: target type: `u8` (8 bits) - = note: this error originates in the macro `$crate::assert_size_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0512]: cannot transmute between types of different sizes, or dependently-sized types --> tests/ui-stable/transmute-mut-src-generic.rs:17:5 @@ -16,4 +16,4 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `AlignOf` (size can vary because of T) = note: target type: `MaxAlignsOf` (size can vary because of T) - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui-stable/transmute-mut-src-unsized.stderr b/tests/ui-stable/transmute-mut-src-unsized.stderr index 588a833566..c272263b9f 100644 --- a/tests/ui-stable/transmute-mut-src-unsized.stderr +++ b/tests/ui-stable/transmute-mut-src-unsized.stderr @@ -55,7 +55,7 @@ note: required by a bound in `AlignOf::::into_t` ... | pub fn into_t(self) -> T { | ------ required by a bound in this associated function - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-stable/transmute-mut-src-unsized.rs:16:35 @@ -65,7 +65,7 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation | = help: the trait `Sized` is not implemented for `[u8]` = note: the left-hand-side of an assignment must have a statically known size - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-stable/transmute-mut-src-unsized.rs:16:35 @@ -79,7 +79,7 @@ note: required by an implicit `Sized` bound in `AlignOf` | | pub struct AlignOf { | ^ required by the implicit `Sized` requirement on this type parameter in `AlignOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-stable/transmute-mut-src-unsized.rs:16:35 @@ -93,7 +93,7 @@ note: required by an implicit `Sized` bound in `MaxAlignsOf` | | pub union MaxAlignsOf { | ^ required by the implicit `Sized` requirement on this type parameter in `MaxAlignsOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-stable/transmute-mut-src-unsized.rs:16:35 @@ -107,7 +107,7 @@ note: required by an implicit `Sized` bound in `AlignOf` | | pub struct AlignOf { | ^ required by the implicit `Sized` requirement on this type parameter in `AlignOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-stable/transmute-mut-src-unsized.rs:16:35 diff --git a/tests/ui-stable/transmute-ref-alignment-increase.stderr b/tests/ui-stable/transmute-ref-alignment-increase.stderr index cd99ff2ec2..5c3180bd51 100644 --- a/tests/ui-stable/transmute-ref-alignment-increase.stderr +++ b/tests/ui-stable/transmute-ref-alignment-increase.stderr @@ -6,4 +6,4 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `AlignOf<[u8; 2]>` (8 bits) = note: target type: `MaxAlignsOf<[u8; 2], AU16>` (16 bits) - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui-stable/transmute-ref-dst-generic.stderr b/tests/ui-stable/transmute-ref-dst-generic.stderr index e30b9f67a6..f2ba1065ce 100644 --- a/tests/ui-stable/transmute-ref-dst-generic.stderr +++ b/tests/ui-stable/transmute-ref-dst-generic.stderr @@ -6,7 +6,7 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `u8` (8 bits) = note: target type: `T` (this type does not have a fixed size) - = note: this error originates in the macro `$crate::assert_size_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0512]: cannot transmute between types of different sizes, or dependently-sized types --> tests/ui-stable/transmute-ref-dst-generic.rs:17:5 @@ -16,4 +16,4 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `AlignOf` (8 bits) = note: target type: `MaxAlignsOf` (size can vary because of T) - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui-stable/transmute-ref-dst-unsized.stderr b/tests/ui-stable/transmute-ref-dst-unsized.stderr index 198eb30e60..7717c4666e 100644 --- a/tests/ui-stable/transmute-ref-dst-unsized.stderr +++ b/tests/ui-stable/transmute-ref-dst-unsized.stderr @@ -38,7 +38,7 @@ note: required by an implicit `Sized` bound in `MaxAlignsOf` | | pub union MaxAlignsOf { | ^ required by the implicit `Sized` requirement on this type parameter in `MaxAlignsOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-stable/transmute-ref-dst-unsized.rs:17:28 @@ -52,7 +52,7 @@ note: required by an implicit `Sized` bound in `transmute` | | pub fn transmute(src: Src) -> Dst; | ^^^ required by the implicit `Sized` requirement on this type parameter in `transmute` - = note: this error originates in the macro `$crate::assert_size_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-stable/transmute-ref-dst-unsized.rs:17:28 diff --git a/tests/ui-stable/transmute-ref-size-decrease.stderr b/tests/ui-stable/transmute-ref-size-decrease.stderr index f353b26ece..81c5bf5a2c 100644 --- a/tests/ui-stable/transmute-ref-size-decrease.stderr +++ b/tests/ui-stable/transmute-ref-size-decrease.stderr @@ -6,4 +6,4 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `[u8; 2]` (16 bits) = note: target type: `u8` (8 bits) - = note: this error originates in the macro `$crate::assert_size_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui-stable/transmute-ref-size-increase.stderr b/tests/ui-stable/transmute-ref-size-increase.stderr index f51eb63f4b..85f51b8ab4 100644 --- a/tests/ui-stable/transmute-ref-size-increase.stderr +++ b/tests/ui-stable/transmute-ref-size-increase.stderr @@ -6,4 +6,4 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `u8` (8 bits) = note: target type: `[u8; 2]` (16 bits) - = note: this error originates in the macro `$crate::assert_size_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui-stable/transmute-ref-src-dst-generic.stderr b/tests/ui-stable/transmute-ref-src-dst-generic.stderr index 0905dc6d5f..48440ad3d6 100644 --- a/tests/ui-stable/transmute-ref-src-dst-generic.stderr +++ b/tests/ui-stable/transmute-ref-src-dst-generic.stderr @@ -6,7 +6,7 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `T` (this type does not have a fixed size) = note: target type: `U` (this type does not have a fixed size) - = note: this error originates in the macro `$crate::assert_size_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0512]: cannot transmute between types of different sizes, or dependently-sized types --> tests/ui-stable/transmute-ref-src-dst-generic.rs:18:5 @@ -16,4 +16,4 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `AlignOf` (size can vary because of T) = note: target type: `MaxAlignsOf` (size can vary because of T) - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui-stable/transmute-ref-src-dst-unsized.stderr b/tests/ui-stable/transmute-ref-src-dst-unsized.stderr index 8c0ad13c38..97552fb444 100644 --- a/tests/ui-stable/transmute-ref-src-dst-unsized.stderr +++ b/tests/ui-stable/transmute-ref-src-dst-unsized.stderr @@ -72,7 +72,7 @@ note: required by a bound in `AlignOf::::into_t` ... | pub fn into_t(self) -> T { | ------ required by a bound in this associated function - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-stable/transmute-ref-src-dst-unsized.rs:17:32 @@ -82,7 +82,7 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation | = help: the trait `Sized` is not implemented for `[u8]` = note: the left-hand-side of an assignment must have a statically known size - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-stable/transmute-ref-src-dst-unsized.rs:17:32 @@ -96,7 +96,7 @@ note: required by an implicit `Sized` bound in `AlignOf` | | pub struct AlignOf { | ^ required by the implicit `Sized` requirement on this type parameter in `AlignOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-stable/transmute-ref-src-dst-unsized.rs:17:32 @@ -110,7 +110,7 @@ note: required by an implicit `Sized` bound in `MaxAlignsOf` | | pub union MaxAlignsOf { | ^ required by the implicit `Sized` requirement on this type parameter in `MaxAlignsOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-stable/transmute-ref-src-dst-unsized.rs:17:32 @@ -124,7 +124,7 @@ note: required by an implicit `Sized` bound in `AlignOf` | | pub struct AlignOf { | ^ required by the implicit `Sized` requirement on this type parameter in `AlignOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-stable/transmute-ref-src-dst-unsized.rs:17:32 @@ -149,7 +149,7 @@ note: required by an implicit `Sized` bound in `transmute` | | pub fn transmute(src: Src) -> Dst; | ^^^ required by the implicit `Sized` requirement on this type parameter in `transmute` - = note: this error originates in the macro `$crate::assert_size_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-stable/transmute-ref-src-dst-unsized.rs:17:32 diff --git a/tests/ui-stable/transmute-ref-src-generic.stderr b/tests/ui-stable/transmute-ref-src-generic.stderr index b6bbd1648a..117cd794a3 100644 --- a/tests/ui-stable/transmute-ref-src-generic.stderr +++ b/tests/ui-stable/transmute-ref-src-generic.stderr @@ -6,7 +6,7 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `T` (this type does not have a fixed size) = note: target type: `u8` (8 bits) - = note: this error originates in the macro `$crate::assert_size_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_size_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0512]: cannot transmute between types of different sizes, or dependently-sized types --> tests/ui-stable/transmute-ref-src-generic.rs:17:5 @@ -16,4 +16,4 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | = note: source type: `AlignOf` (size can vary because of T) = note: target type: `MaxAlignsOf` (size can vary because of T) - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui-stable/transmute-ref-src-unsized.stderr b/tests/ui-stable/transmute-ref-src-unsized.stderr index 63d2f3a756..78ee269a20 100644 --- a/tests/ui-stable/transmute-ref-src-unsized.stderr +++ b/tests/ui-stable/transmute-ref-src-unsized.stderr @@ -55,7 +55,7 @@ note: required by a bound in `AlignOf::::into_t` ... | pub fn into_t(self) -> T { | ------ required by a bound in this associated function - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-stable/transmute-ref-src-unsized.rs:16:31 @@ -65,7 +65,7 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation | = help: the trait `Sized` is not implemented for `[u8]` = note: the left-hand-side of an assignment must have a statically known size - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-stable/transmute-ref-src-unsized.rs:16:31 @@ -79,7 +79,7 @@ note: required by an implicit `Sized` bound in `AlignOf` | | pub struct AlignOf { | ^ required by the implicit `Sized` requirement on this type parameter in `AlignOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-stable/transmute-ref-src-unsized.rs:16:31 @@ -93,7 +93,7 @@ note: required by an implicit `Sized` bound in `MaxAlignsOf` | | pub union MaxAlignsOf { | ^ required by the implicit `Sized` requirement on this type parameter in `MaxAlignsOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-stable/transmute-ref-src-unsized.rs:16:31 @@ -107,7 +107,7 @@ note: required by an implicit `Sized` bound in `AlignOf` | | pub struct AlignOf { | ^ required by the implicit `Sized` requirement on this type parameter in `AlignOf` - = note: this error originates in the macro `$crate::assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::unsafe_assert_align_gt_eq` which comes from the expansion of the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-stable/transmute-ref-src-unsized.rs:16:31