From 21d1ab4877c96a2b2fa802444f3a3d311a96beef Mon Sep 17 00:00:00 2001 From: Jack Wrenn Date: Thu, 21 Jul 2022 17:53:01 +0000 Subject: [PATCH] safe transmute: add `rustc_on_unimplemented` to `BikeshedIntrinsicFrom` ref: https://github.com/rust-lang/rust/pull/92268#discussion_r925266583 --- library/core/src/mem/transmutability.rs | 4 + .../should_require_well_defined_layout.rs | 12 +- .../should_require_well_defined_layout.stderr | 30 +- ...mitive_reprs_should_have_correct_length.rs | 40 +-- ...ve_reprs_should_have_correct_length.stderr | 100 +++--- .../should_require_well_defined_layout.rs | 12 +- .../should_require_well_defined_layout.stderr | 30 +- .../enums/should_pad_variants.rs | 2 +- .../enums/should_pad_variants.stderr | 5 +- .../enums/should_respect_endianness.rs | 2 +- .../enums/should_respect_endianness.stderr | 5 +- .../ui/transmutability/primitives/bool.rs | 2 +- .../ui/transmutability/primitives/bool.stderr | 5 +- .../ui/transmutability/primitives/numbers.rs | 114 +++---- .../transmutability/primitives/numbers.stderr | 285 +++++++++++------- .../ui/transmutability/primitives/unit.rs | 2 +- .../ui/transmutability/primitives/unit.stderr | 5 +- src/test/ui/transmutability/references.rs | 2 +- src/test/ui/transmutability/references.stderr | 5 +- .../should_require_well_defined_layout.rs | 24 +- .../should_require_well_defined_layout.stderr | 60 ++-- .../should_require_well_defined_layout.rs | 4 +- .../should_require_well_defined_layout.stderr | 10 +- .../unions/should_pad_variants.rs | 2 +- .../unions/should_pad_variants.stderr | 5 +- .../unions/should_reject_contraction.rs | 2 +- .../unions/should_reject_contraction.stderr | 5 +- .../unions/should_reject_disjoint.rs | 4 +- .../unions/should_reject_disjoint.stderr | 10 +- .../unions/should_reject_intersecting.rs | 4 +- .../unions/should_reject_intersecting.stderr | 10 +- .../should_reject_if_dst_has_private_field.rs | 2 +- ...uld_reject_if_dst_has_private_field.stderr | 5 +- ...hould_reject_if_dst_has_private_variant.rs | 2 +- ...d_reject_if_dst_has_private_variant.stderr | 5 +- ...ect_if_dst_has_tricky_unreachable_field.rs | 2 +- ...uld_reject_if_dst_has_unreachable_field.rs | 2 +- ...reject_if_dst_has_unreachable_field.stderr | 5 +- ...should_reject_if_dst_has_unreachable_ty.rs | 2 +- ...ld_reject_if_dst_has_unreachable_ty.stderr | 5 +- 40 files changed, 477 insertions(+), 355 deletions(-) diff --git a/library/core/src/mem/transmutability.rs b/library/core/src/mem/transmutability.rs index 52342f8a0ecd..820a7582b113 100644 --- a/library/core/src/mem/transmutability.rs +++ b/library/core/src/mem/transmutability.rs @@ -5,6 +5,10 @@ /// notwithstanding whatever safety checks you have asked the compiler to [`Assume`] are satisfied. #[unstable(feature = "transmutability", issue = "none")] #[cfg_attr(not(bootstrap), lang = "transmute_trait")] +#[rustc_on_unimplemented( + message = "`{Src}` cannot be safely transmuted into `{Self}` in the defining scope of `{Context}`.", + label = "`{Src}` cannot be safely transmuted into `{Self}` in the defining scope of `{Context}`." +)] pub unsafe trait BikeshedIntrinsicFrom< Src, Context, diff --git a/src/test/ui/transmutability/arrays/should_require_well_defined_layout.rs b/src/test/ui/transmutability/arrays/should_require_well_defined_layout.rs index 36f9ceb0da7a..8e69527c1862 100644 --- a/src/test/ui/transmutability/arrays/should_require_well_defined_layout.rs +++ b/src/test/ui/transmutability/arrays/should_require_well_defined_layout.rs @@ -18,20 +18,20 @@ fn should_reject_repr_rust() { fn unit() { type repr_rust = [String; 0]; - assert::is_maybe_transmutable::(); //~ ERROR not satisfied - assert::is_maybe_transmutable::(); //~ ERROR not satisfied + assert::is_maybe_transmutable::(); //~ ERROR cannot be safely transmuted + assert::is_maybe_transmutable::(); //~ ERROR cannot be safely transmuted } fn singleton() { type repr_rust = [String; 1]; - assert::is_maybe_transmutable::(); //~ ERROR not satisfied - assert::is_maybe_transmutable::(); //~ ERROR not satisfied + assert::is_maybe_transmutable::(); //~ ERROR cannot be safely transmuted + assert::is_maybe_transmutable::(); //~ ERROR cannot be safely transmuted } fn duplex() { type repr_rust = [String; 2]; - assert::is_maybe_transmutable::(); //~ ERROR not satisfied - assert::is_maybe_transmutable::(); //~ ERROR not satisfied + assert::is_maybe_transmutable::(); //~ ERROR cannot be safely transmuted + assert::is_maybe_transmutable::(); //~ ERROR cannot be safely transmuted } } diff --git a/src/test/ui/transmutability/arrays/should_require_well_defined_layout.stderr b/src/test/ui/transmutability/arrays/should_require_well_defined_layout.stderr index 109e58c4093c..eae0c947d425 100644 --- a/src/test/ui/transmutability/arrays/should_require_well_defined_layout.stderr +++ b/src/test/ui/transmutability/arrays/should_require_well_defined_layout.stderr @@ -1,9 +1,10 @@ -error[E0277]: the trait bound `(): BikeshedIntrinsicFrom<[String; 0], assert::Context, true, true, true, true>` is not satisfied +error[E0277]: `[String; 0]` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. --> $DIR/should_require_well_defined_layout.rs:21:52 | LL | assert::is_maybe_transmutable::(); - | ^^ the trait `BikeshedIntrinsicFrom<[String; 0], assert::Context, true, true, true, true>` is not implemented for `()` + | ^^ `[String; 0]` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<[String; 0], assert::Context, true, true, true, true>` is not implemented for `()` note: required by a bound in `is_maybe_transmutable` --> $DIR/should_require_well_defined_layout.rs:13:14 | @@ -13,12 +14,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable` -error[E0277]: the trait bound `[String; 0]: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `u128` cannot be safely transmuted into `[String; 0]` in the defining scope of `assert::Context`. --> $DIR/should_require_well_defined_layout.rs:22:47 | LL | assert::is_maybe_transmutable::(); - | ^^^^^^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `[String; 0]` + | ^^^^^^^^^ `u128` cannot be safely transmuted into `[String; 0]` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `[String; 0]` note: required by a bound in `is_maybe_transmutable` --> $DIR/should_require_well_defined_layout.rs:13:14 | @@ -28,12 +30,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable` -error[E0277]: the trait bound `(): BikeshedIntrinsicFrom<[String; 1], assert::Context, true, true, true, true>` is not satisfied +error[E0277]: `[String; 1]` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. --> $DIR/should_require_well_defined_layout.rs:27:52 | LL | assert::is_maybe_transmutable::(); - | ^^ the trait `BikeshedIntrinsicFrom<[String; 1], assert::Context, true, true, true, true>` is not implemented for `()` + | ^^ `[String; 1]` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<[String; 1], assert::Context, true, true, true, true>` is not implemented for `()` note: required by a bound in `is_maybe_transmutable` --> $DIR/should_require_well_defined_layout.rs:13:14 | @@ -43,12 +46,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable` -error[E0277]: the trait bound `[String; 1]: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `u128` cannot be safely transmuted into `[String; 1]` in the defining scope of `assert::Context`. --> $DIR/should_require_well_defined_layout.rs:28:47 | LL | assert::is_maybe_transmutable::(); - | ^^^^^^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `[String; 1]` + | ^^^^^^^^^ `u128` cannot be safely transmuted into `[String; 1]` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `[String; 1]` note: required by a bound in `is_maybe_transmutable` --> $DIR/should_require_well_defined_layout.rs:13:14 | @@ -58,12 +62,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable` -error[E0277]: the trait bound `(): BikeshedIntrinsicFrom<[String; 2], assert::Context, true, true, true, true>` is not satisfied +error[E0277]: `[String; 2]` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. --> $DIR/should_require_well_defined_layout.rs:33:52 | LL | assert::is_maybe_transmutable::(); - | ^^ the trait `BikeshedIntrinsicFrom<[String; 2], assert::Context, true, true, true, true>` is not implemented for `()` + | ^^ `[String; 2]` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<[String; 2], assert::Context, true, true, true, true>` is not implemented for `()` note: required by a bound in `is_maybe_transmutable` --> $DIR/should_require_well_defined_layout.rs:13:14 | @@ -73,12 +78,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable` -error[E0277]: the trait bound `[String; 2]: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `u128` cannot be safely transmuted into `[String; 2]` in the defining scope of `assert::Context`. --> $DIR/should_require_well_defined_layout.rs:34:47 | LL | assert::is_maybe_transmutable::(); - | ^^^^^^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `[String; 2]` + | ^^^^^^^^^ `u128` cannot be safely transmuted into `[String; 2]` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `[String; 2]` note: required by a bound in `is_maybe_transmutable` --> $DIR/should_require_well_defined_layout.rs:13:14 | diff --git a/src/test/ui/transmutability/enums/repr/primitive_reprs_should_have_correct_length.rs b/src/test/ui/transmutability/enums/repr/primitive_reprs_should_have_correct_length.rs index cd411a4b838e..18e02b0d2b90 100644 --- a/src/test/ui/transmutability/enums/repr/primitive_reprs_should_have_correct_length.rs +++ b/src/test/ui/transmutability/enums/repr/primitive_reprs_should_have_correct_length.rs @@ -38,17 +38,17 @@ fn n8() { fn i_should_have_correct_length() { type Current = V0i8; - assert::is_transmutable::(); //~ ERROR not satisfied + assert::is_transmutable::(); //~ ERROR cannot be safely transmuted assert::is_transmutable::(); - assert::is_transmutable::(); //~ ERROR not satisfied + assert::is_transmutable::(); //~ ERROR cannot be safely transmuted } fn u_should_have_correct_length() { type Current = V0u8; - assert::is_transmutable::(); //~ ERROR not satisfied + assert::is_transmutable::(); //~ ERROR cannot be safely transmuted assert::is_transmutable::(); - assert::is_transmutable::(); //~ ERROR not satisfied + assert::is_transmutable::(); //~ ERROR cannot be safely transmuted } } @@ -62,17 +62,17 @@ fn n16() { fn i_should_have_correct_length() { type Current = V0i16; - assert::is_transmutable::(); //~ ERROR not satisfied + assert::is_transmutable::(); //~ ERROR cannot be safely transmuted assert::is_transmutable::(); - assert::is_transmutable::(); //~ ERROR not satisfied + assert::is_transmutable::(); //~ ERROR cannot be safely transmuted } fn u_should_have_correct_length() { type Current = V0u16; - assert::is_transmutable::(); //~ ERROR not satisfied + assert::is_transmutable::(); //~ ERROR cannot be safely transmuted assert::is_transmutable::(); - assert::is_transmutable::(); //~ ERROR not satisfied + assert::is_transmutable::(); //~ ERROR cannot be safely transmuted } } @@ -86,17 +86,17 @@ fn n32() { fn i_should_have_correct_length() { type Current = V0i32; - assert::is_transmutable::(); //~ ERROR not satisfied + assert::is_transmutable::(); //~ ERROR cannot be safely transmuted assert::is_transmutable::(); - assert::is_transmutable::(); //~ ERROR not satisfied + assert::is_transmutable::(); //~ ERROR cannot be safely transmuted } fn u_should_have_correct_length() { type Current = V0u32; - assert::is_transmutable::(); //~ ERROR not satisfied + assert::is_transmutable::(); //~ ERROR cannot be safely transmuted assert::is_transmutable::(); - assert::is_transmutable::(); //~ ERROR not satisfied + assert::is_transmutable::(); //~ ERROR cannot be safely transmuted } } @@ -110,17 +110,17 @@ fn n64() { fn i_should_have_correct_length() { type Current = V0i64; - assert::is_transmutable::(); //~ ERROR not satisfied + assert::is_transmutable::(); //~ ERROR cannot be safely transmuted assert::is_transmutable::(); - assert::is_transmutable::(); //~ ERROR not satisfied + assert::is_transmutable::(); //~ ERROR cannot be safely transmuted } fn u_should_have_correct_length() { type Current = V0u64; - assert::is_transmutable::(); //~ ERROR not satisfied + assert::is_transmutable::(); //~ ERROR cannot be safely transmuted assert::is_transmutable::(); - assert::is_transmutable::(); //~ ERROR not satisfied + assert::is_transmutable::(); //~ ERROR cannot be safely transmuted } } @@ -134,16 +134,16 @@ fn nsize() { fn i_should_have_correct_length() { type Current = V0isize; - assert::is_transmutable::(); //~ ERROR not satisfied + assert::is_transmutable::(); //~ ERROR cannot be safely transmuted assert::is_transmutable::(); - assert::is_transmutable::(); //~ ERROR not satisfied + assert::is_transmutable::(); //~ ERROR cannot be safely transmuted } fn u_should_have_correct_length() { type Current = V0usize; - assert::is_transmutable::(); //~ ERROR not satisfied + assert::is_transmutable::(); //~ ERROR cannot be safely transmuted assert::is_transmutable::(); - assert::is_transmutable::(); //~ ERROR not satisfied + assert::is_transmutable::(); //~ ERROR cannot be safely transmuted } } diff --git a/src/test/ui/transmutability/enums/repr/primitive_reprs_should_have_correct_length.stderr b/src/test/ui/transmutability/enums/repr/primitive_reprs_should_have_correct_length.stderr index da24c6a021ef..fa2e3b89b079 100644 --- a/src/test/ui/transmutability/enums/repr/primitive_reprs_should_have_correct_length.stderr +++ b/src/test/ui/transmutability/enums/repr/primitive_reprs_should_have_correct_length.stderr @@ -1,9 +1,10 @@ -error[E0277]: the trait bound `V0i8: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `Zst` cannot be safely transmuted into `V0i8` in the defining scope of `n8::Context`. --> $DIR/primitive_reprs_should_have_correct_length.rs:41:44 | LL | assert::is_transmutable::(); - | ^^^^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `V0i8` + | ^^^^^^^ `Zst` cannot be safely transmuted into `V0i8` in the defining scope of `n8::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `V0i8` note: required by a bound in `is_transmutable` --> $DIR/primitive_reprs_should_have_correct_length.rs:12:14 | @@ -13,12 +14,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u16: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `V0i8` cannot be safely transmuted into `u16` in the defining scope of `n8::Context`. --> $DIR/primitive_reprs_should_have_correct_length.rs:43:44 | LL | assert::is_transmutable::(); - | ^^^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `u16` + | ^^^^^^ `V0i8` cannot be safely transmuted into `u16` in the defining scope of `n8::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u16` note: required by a bound in `is_transmutable` --> $DIR/primitive_reprs_should_have_correct_length.rs:12:14 | @@ -28,12 +30,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `V0u8: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `Zst` cannot be safely transmuted into `V0u8` in the defining scope of `n8::Context`. --> $DIR/primitive_reprs_should_have_correct_length.rs:49:44 | LL | assert::is_transmutable::(); - | ^^^^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `V0u8` + | ^^^^^^^ `Zst` cannot be safely transmuted into `V0u8` in the defining scope of `n8::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `V0u8` note: required by a bound in `is_transmutable` --> $DIR/primitive_reprs_should_have_correct_length.rs:12:14 | @@ -43,12 +46,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u16: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `V0u8` cannot be safely transmuted into `u16` in the defining scope of `n8::Context`. --> $DIR/primitive_reprs_should_have_correct_length.rs:51:44 | LL | assert::is_transmutable::(); - | ^^^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `u16` + | ^^^^^^ `V0u8` cannot be safely transmuted into `u16` in the defining scope of `n8::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u16` note: required by a bound in `is_transmutable` --> $DIR/primitive_reprs_should_have_correct_length.rs:12:14 | @@ -58,12 +62,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `V0i16: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `u8` cannot be safely transmuted into `V0i16` in the defining scope of `n16::Context`. --> $DIR/primitive_reprs_should_have_correct_length.rs:65:44 | LL | assert::is_transmutable::(); - | ^^^^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `V0i16` + | ^^^^^^^ `u8` cannot be safely transmuted into `V0i16` in the defining scope of `n16::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `V0i16` note: required by a bound in `is_transmutable` --> $DIR/primitive_reprs_should_have_correct_length.rs:12:14 | @@ -73,12 +78,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u32: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `V0i16` cannot be safely transmuted into `u32` in the defining scope of `n16::Context`. --> $DIR/primitive_reprs_should_have_correct_length.rs:67:44 | LL | assert::is_transmutable::(); - | ^^^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `u32` + | ^^^^^^ `V0i16` cannot be safely transmuted into `u32` in the defining scope of `n16::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u32` note: required by a bound in `is_transmutable` --> $DIR/primitive_reprs_should_have_correct_length.rs:12:14 | @@ -88,12 +94,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `V0u16: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `u8` cannot be safely transmuted into `V0u16` in the defining scope of `n16::Context`. --> $DIR/primitive_reprs_should_have_correct_length.rs:73:44 | LL | assert::is_transmutable::(); - | ^^^^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `V0u16` + | ^^^^^^^ `u8` cannot be safely transmuted into `V0u16` in the defining scope of `n16::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `V0u16` note: required by a bound in `is_transmutable` --> $DIR/primitive_reprs_should_have_correct_length.rs:12:14 | @@ -103,12 +110,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u32: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `V0u16` cannot be safely transmuted into `u32` in the defining scope of `n16::Context`. --> $DIR/primitive_reprs_should_have_correct_length.rs:75:44 | LL | assert::is_transmutable::(); - | ^^^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `u32` + | ^^^^^^ `V0u16` cannot be safely transmuted into `u32` in the defining scope of `n16::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u32` note: required by a bound in `is_transmutable` --> $DIR/primitive_reprs_should_have_correct_length.rs:12:14 | @@ -118,12 +126,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `V0i32: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `u16` cannot be safely transmuted into `V0i32` in the defining scope of `n32::Context`. --> $DIR/primitive_reprs_should_have_correct_length.rs:89:44 | LL | assert::is_transmutable::(); - | ^^^^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `V0i32` + | ^^^^^^^ `u16` cannot be safely transmuted into `V0i32` in the defining scope of `n32::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `V0i32` note: required by a bound in `is_transmutable` --> $DIR/primitive_reprs_should_have_correct_length.rs:12:14 | @@ -133,12 +142,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u64: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `V0i32` cannot be safely transmuted into `u64` in the defining scope of `n32::Context`. --> $DIR/primitive_reprs_should_have_correct_length.rs:91:44 | LL | assert::is_transmutable::(); - | ^^^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `u64` + | ^^^^^^ `V0i32` cannot be safely transmuted into `u64` in the defining scope of `n32::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u64` note: required by a bound in `is_transmutable` --> $DIR/primitive_reprs_should_have_correct_length.rs:12:14 | @@ -148,12 +158,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `V0u32: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `u16` cannot be safely transmuted into `V0u32` in the defining scope of `n32::Context`. --> $DIR/primitive_reprs_should_have_correct_length.rs:97:44 | LL | assert::is_transmutable::(); - | ^^^^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `V0u32` + | ^^^^^^^ `u16` cannot be safely transmuted into `V0u32` in the defining scope of `n32::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `V0u32` note: required by a bound in `is_transmutable` --> $DIR/primitive_reprs_should_have_correct_length.rs:12:14 | @@ -163,12 +174,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u64: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `V0u32` cannot be safely transmuted into `u64` in the defining scope of `n32::Context`. --> $DIR/primitive_reprs_should_have_correct_length.rs:99:44 | LL | assert::is_transmutable::(); - | ^^^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `u64` + | ^^^^^^ `V0u32` cannot be safely transmuted into `u64` in the defining scope of `n32::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u64` note: required by a bound in `is_transmutable` --> $DIR/primitive_reprs_should_have_correct_length.rs:12:14 | @@ -178,12 +190,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `V0i64: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `u32` cannot be safely transmuted into `V0i64` in the defining scope of `n64::Context`. --> $DIR/primitive_reprs_should_have_correct_length.rs:113:44 | LL | assert::is_transmutable::(); - | ^^^^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `V0i64` + | ^^^^^^^ `u32` cannot be safely transmuted into `V0i64` in the defining scope of `n64::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `V0i64` note: required by a bound in `is_transmutable` --> $DIR/primitive_reprs_should_have_correct_length.rs:12:14 | @@ -193,12 +206,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u128: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `V0i64` cannot be safely transmuted into `u128` in the defining scope of `n64::Context`. --> $DIR/primitive_reprs_should_have_correct_length.rs:115:44 | LL | assert::is_transmutable::(); - | ^^^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `u128` + | ^^^^^^ `V0i64` cannot be safely transmuted into `u128` in the defining scope of `n64::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u128` note: required by a bound in `is_transmutable` --> $DIR/primitive_reprs_should_have_correct_length.rs:12:14 | @@ -208,12 +222,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `V0u64: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `u32` cannot be safely transmuted into `V0u64` in the defining scope of `n64::Context`. --> $DIR/primitive_reprs_should_have_correct_length.rs:121:44 | LL | assert::is_transmutable::(); - | ^^^^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `V0u64` + | ^^^^^^^ `u32` cannot be safely transmuted into `V0u64` in the defining scope of `n64::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `V0u64` note: required by a bound in `is_transmutable` --> $DIR/primitive_reprs_should_have_correct_length.rs:12:14 | @@ -223,12 +238,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u128: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `V0u64` cannot be safely transmuted into `u128` in the defining scope of `n64::Context`. --> $DIR/primitive_reprs_should_have_correct_length.rs:123:44 | LL | assert::is_transmutable::(); - | ^^^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `u128` + | ^^^^^^ `V0u64` cannot be safely transmuted into `u128` in the defining scope of `n64::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u128` note: required by a bound in `is_transmutable` --> $DIR/primitive_reprs_should_have_correct_length.rs:12:14 | @@ -238,12 +254,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `V0isize: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `u8` cannot be safely transmuted into `V0isize` in the defining scope of `nsize::Context`. --> $DIR/primitive_reprs_should_have_correct_length.rs:137:44 | LL | assert::is_transmutable::(); - | ^^^^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `V0isize` + | ^^^^^^^ `u8` cannot be safely transmuted into `V0isize` in the defining scope of `nsize::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `V0isize` note: required by a bound in `is_transmutable` --> $DIR/primitive_reprs_should_have_correct_length.rs:12:14 | @@ -253,12 +270,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `[usize; 2]: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `V0isize` cannot be safely transmuted into `[usize; 2]` in the defining scope of `nsize::Context`. --> $DIR/primitive_reprs_should_have_correct_length.rs:139:44 | LL | assert::is_transmutable::(); - | ^^^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `[usize; 2]` + | ^^^^^^ `V0isize` cannot be safely transmuted into `[usize; 2]` in the defining scope of `nsize::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `[usize; 2]` note: required by a bound in `is_transmutable` --> $DIR/primitive_reprs_should_have_correct_length.rs:12:14 | @@ -268,12 +286,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `V0usize: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `u8` cannot be safely transmuted into `V0usize` in the defining scope of `nsize::Context`. --> $DIR/primitive_reprs_should_have_correct_length.rs:145:44 | LL | assert::is_transmutable::(); - | ^^^^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `V0usize` + | ^^^^^^^ `u8` cannot be safely transmuted into `V0usize` in the defining scope of `nsize::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `V0usize` note: required by a bound in `is_transmutable` --> $DIR/primitive_reprs_should_have_correct_length.rs:12:14 | @@ -283,12 +302,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `[usize; 2]: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `V0usize` cannot be safely transmuted into `[usize; 2]` in the defining scope of `nsize::Context`. --> $DIR/primitive_reprs_should_have_correct_length.rs:147:44 | LL | assert::is_transmutable::(); - | ^^^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `[usize; 2]` + | ^^^^^^ `V0usize` cannot be safely transmuted into `[usize; 2]` in the defining scope of `nsize::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `[usize; 2]` note: required by a bound in `is_transmutable` --> $DIR/primitive_reprs_should_have_correct_length.rs:12:14 | diff --git a/src/test/ui/transmutability/enums/repr/should_require_well_defined_layout.rs b/src/test/ui/transmutability/enums/repr/should_require_well_defined_layout.rs index 24a88d6ac95c..978a12648f03 100644 --- a/src/test/ui/transmutability/enums/repr/should_require_well_defined_layout.rs +++ b/src/test/ui/transmutability/enums/repr/should_require_well_defined_layout.rs @@ -18,20 +18,20 @@ mod assert { fn should_reject_repr_rust() { fn void() { enum repr_rust {} - assert::is_maybe_transmutable::(); //~ ERROR not satisfied - assert::is_maybe_transmutable::(); //~ ERROR not satisfied + assert::is_maybe_transmutable::(); //~ ERROR cannot be safely transmuted + assert::is_maybe_transmutable::(); //~ ERROR cannot be safely transmuted } fn singleton() { enum repr_rust { V } - assert::is_maybe_transmutable::(); //~ ERROR not satisfied - assert::is_maybe_transmutable::(); //~ ERROR not satisfied + assert::is_maybe_transmutable::(); //~ ERROR cannot be safely transmuted + assert::is_maybe_transmutable::(); //~ ERROR cannot be safely transmuted } fn duplex() { enum repr_rust { A, B } - assert::is_maybe_transmutable::(); //~ ERROR not satisfied - assert::is_maybe_transmutable::(); //~ ERROR not satisfied + assert::is_maybe_transmutable::(); //~ ERROR cannot be safely transmuted + assert::is_maybe_transmutable::(); //~ ERROR cannot be safely transmuted } } diff --git a/src/test/ui/transmutability/enums/repr/should_require_well_defined_layout.stderr b/src/test/ui/transmutability/enums/repr/should_require_well_defined_layout.stderr index 1bfbff68f06c..3273e87c89ff 100644 --- a/src/test/ui/transmutability/enums/repr/should_require_well_defined_layout.stderr +++ b/src/test/ui/transmutability/enums/repr/should_require_well_defined_layout.stderr @@ -1,9 +1,10 @@ -error[E0277]: the trait bound `(): BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `void::repr_rust` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. --> $DIR/should_require_well_defined_layout.rs:21:52 | LL | assert::is_maybe_transmutable::(); - | ^^ the trait `BikeshedIntrinsicFrom` is not implemented for `()` + | ^^ `void::repr_rust` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `()` note: required by a bound in `is_maybe_transmutable` --> $DIR/should_require_well_defined_layout.rs:14:14 | @@ -13,12 +14,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable` -error[E0277]: the trait bound `void::repr_rust: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `u128` cannot be safely transmuted into `void::repr_rust` in the defining scope of `assert::Context`. --> $DIR/should_require_well_defined_layout.rs:22:47 | LL | assert::is_maybe_transmutable::(); - | ^^^^^^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `void::repr_rust` + | ^^^^^^^^^ `u128` cannot be safely transmuted into `void::repr_rust` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `void::repr_rust` note: required by a bound in `is_maybe_transmutable` --> $DIR/should_require_well_defined_layout.rs:14:14 | @@ -28,12 +30,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable` -error[E0277]: the trait bound `(): BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `singleton::repr_rust` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. --> $DIR/should_require_well_defined_layout.rs:27:52 | LL | assert::is_maybe_transmutable::(); - | ^^ the trait `BikeshedIntrinsicFrom` is not implemented for `()` + | ^^ `singleton::repr_rust` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `()` note: required by a bound in `is_maybe_transmutable` --> $DIR/should_require_well_defined_layout.rs:14:14 | @@ -43,12 +46,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable` -error[E0277]: the trait bound `singleton::repr_rust: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `u128` cannot be safely transmuted into `singleton::repr_rust` in the defining scope of `assert::Context`. --> $DIR/should_require_well_defined_layout.rs:28:47 | LL | assert::is_maybe_transmutable::(); - | ^^^^^^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `singleton::repr_rust` + | ^^^^^^^^^ `u128` cannot be safely transmuted into `singleton::repr_rust` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `singleton::repr_rust` note: required by a bound in `is_maybe_transmutable` --> $DIR/should_require_well_defined_layout.rs:14:14 | @@ -58,12 +62,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable` -error[E0277]: the trait bound `(): BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `duplex::repr_rust` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. --> $DIR/should_require_well_defined_layout.rs:33:52 | LL | assert::is_maybe_transmutable::(); - | ^^ the trait `BikeshedIntrinsicFrom` is not implemented for `()` + | ^^ `duplex::repr_rust` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `()` note: required by a bound in `is_maybe_transmutable` --> $DIR/should_require_well_defined_layout.rs:14:14 | @@ -73,12 +78,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable` -error[E0277]: the trait bound `duplex::repr_rust: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `u128` cannot be safely transmuted into `duplex::repr_rust` in the defining scope of `assert::Context`. --> $DIR/should_require_well_defined_layout.rs:34:47 | LL | assert::is_maybe_transmutable::(); - | ^^^^^^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `duplex::repr_rust` + | ^^^^^^^^^ `u128` cannot be safely transmuted into `duplex::repr_rust` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `duplex::repr_rust` note: required by a bound in `is_maybe_transmutable` --> $DIR/should_require_well_defined_layout.rs:14:14 | diff --git a/src/test/ui/transmutability/enums/should_pad_variants.rs b/src/test/ui/transmutability/enums/should_pad_variants.rs index 87951586523d..466b6c8a15b5 100644 --- a/src/test/ui/transmutability/enums/should_pad_variants.rs +++ b/src/test/ui/transmutability/enums/should_pad_variants.rs @@ -36,5 +36,5 @@ fn should_pad_variants() { struct Context; // If the implementation (incorrectly) fails to pad `Lopsided::Smol` with // an uninitialized byte, this transmutation might be (wrongly) accepted: - assert::is_transmutable::(); //~ ERROR not satisfied + assert::is_transmutable::(); //~ ERROR cannot be safely transmuted } diff --git a/src/test/ui/transmutability/enums/should_pad_variants.stderr b/src/test/ui/transmutability/enums/should_pad_variants.stderr index b940ca077d4a..429f7211d17a 100644 --- a/src/test/ui/transmutability/enums/should_pad_variants.stderr +++ b/src/test/ui/transmutability/enums/should_pad_variants.stderr @@ -1,9 +1,10 @@ -error[E0277]: the trait bound `Dst: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `Src` cannot be safely transmuted into `Dst` in the defining scope of `should_pad_variants::Context`. --> $DIR/should_pad_variants.rs:39:36 | LL | assert::is_transmutable::(); - | ^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `Dst` + | ^^^ `Src` cannot be safely transmuted into `Dst` in the defining scope of `should_pad_variants::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `Dst` note: required by a bound in `is_transmutable` --> $DIR/should_pad_variants.rs:13:14 | diff --git a/src/test/ui/transmutability/enums/should_respect_endianness.rs b/src/test/ui/transmutability/enums/should_respect_endianness.rs index 9bab44e1d914..67a3c4e94ba8 100644 --- a/src/test/ui/transmutability/enums/should_respect_endianness.rs +++ b/src/test/ui/transmutability/enums/should_respect_endianness.rs @@ -29,5 +29,5 @@ mod assert { fn should_respect_endianness() { assert::is_transmutable::(); - assert::is_transmutable::(); //~ ERROR not satisfied + assert::is_transmutable::(); //~ ERROR cannot be safely transmuted } diff --git a/src/test/ui/transmutability/enums/should_respect_endianness.stderr b/src/test/ui/transmutability/enums/should_respect_endianness.stderr index 3f3335d4a1b8..78023cb378ac 100644 --- a/src/test/ui/transmutability/enums/should_respect_endianness.stderr +++ b/src/test/ui/transmutability/enums/should_respect_endianness.stderr @@ -1,9 +1,10 @@ -error[E0277]: the trait bound `Unexpected: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `Src` cannot be safely transmuted into `Unexpected` in the defining scope of `assert::Context`. --> $DIR/should_respect_endianness.rs:32:36 | LL | assert::is_transmutable::(); - | ^^^^^^^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `Unexpected` + | ^^^^^^^^^^ `Src` cannot be safely transmuted into `Unexpected` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `Unexpected` note: required by a bound in `is_transmutable` --> $DIR/should_respect_endianness.rs:15:14 | diff --git a/src/test/ui/transmutability/primitives/bool.rs b/src/test/ui/transmutability/primitives/bool.rs index 13cecd1d8b7e..4f79bc253370 100644 --- a/src/test/ui/transmutability/primitives/bool.rs +++ b/src/test/ui/transmutability/primitives/bool.rs @@ -19,7 +19,7 @@ mod assert { } fn contrast_with_u8() { - assert::is_transmutable::(); //~ ERROR not satisfied + assert::is_transmutable::(); //~ ERROR cannot be safely transmuted assert::is_maybe_transmutable::(); assert::is_transmutable::(); } diff --git a/src/test/ui/transmutability/primitives/bool.stderr b/src/test/ui/transmutability/primitives/bool.stderr index f05bb433ec84..dc740251c871 100644 --- a/src/test/ui/transmutability/primitives/bool.stderr +++ b/src/test/ui/transmutability/primitives/bool.stderr @@ -1,9 +1,10 @@ -error[E0277]: the trait bound `bool: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `u8` cannot be safely transmuted into `bool` in the defining scope of `assert::Context`. --> $DIR/bool.rs:22:35 | LL | assert::is_transmutable::(); - | ^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `bool` + | ^^^^ `u8` cannot be safely transmuted into `bool` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `bool` note: required by a bound in `is_transmutable` --> $DIR/bool.rs:12:14 | diff --git a/src/test/ui/transmutability/primitives/numbers.rs b/src/test/ui/transmutability/primitives/numbers.rs index 3dbdfab9686a..a5f79065d8aa 100644 --- a/src/test/ui/transmutability/primitives/numbers.rs +++ b/src/test/ui/transmutability/primitives/numbers.rs @@ -59,70 +59,70 @@ fn should_be_bitransmutable() { } fn should_reject_extension() { - assert::is_transmutable::< i8, i16>(); //~ ERROR not satisfied - assert::is_transmutable::< i8, u16>(); //~ ERROR not satisfied - assert::is_transmutable::< i8, i32>(); //~ ERROR not satisfied - assert::is_transmutable::< i8, f32>(); //~ ERROR not satisfied - assert::is_transmutable::< i8, u32>(); //~ ERROR not satisfied - assert::is_transmutable::< i8, u64>(); //~ ERROR not satisfied - assert::is_transmutable::< i8, i64>(); //~ ERROR not satisfied - assert::is_transmutable::< i8, f64>(); //~ ERROR not satisfied - assert::is_transmutable::< i8, u128>(); //~ ERROR not satisfied - assert::is_transmutable::< i8, i128>(); //~ ERROR not satisfied + assert::is_transmutable::< i8, i16>(); //~ ERROR cannot be safely transmuted + assert::is_transmutable::< i8, u16>(); //~ ERROR cannot be safely transmuted + assert::is_transmutable::< i8, i32>(); //~ ERROR cannot be safely transmuted + assert::is_transmutable::< i8, f32>(); //~ ERROR cannot be safely transmuted + assert::is_transmutable::< i8, u32>(); //~ ERROR cannot be safely transmuted + assert::is_transmutable::< i8, u64>(); //~ ERROR cannot be safely transmuted + assert::is_transmutable::< i8, i64>(); //~ ERROR cannot be safely transmuted + assert::is_transmutable::< i8, f64>(); //~ ERROR cannot be safely transmuted + assert::is_transmutable::< i8, u128>(); //~ ERROR cannot be safely transmuted + assert::is_transmutable::< i8, i128>(); //~ ERROR cannot be safely transmuted - assert::is_transmutable::< u8, i16>(); //~ ERROR not satisfied - assert::is_transmutable::< u8, u16>(); //~ ERROR not satisfied - assert::is_transmutable::< u8, i32>(); //~ ERROR not satisfied - assert::is_transmutable::< u8, f32>(); //~ ERROR not satisfied - assert::is_transmutable::< u8, u32>(); //~ ERROR not satisfied - assert::is_transmutable::< u8, u64>(); //~ ERROR not satisfied - assert::is_transmutable::< u8, i64>(); //~ ERROR not satisfied - assert::is_transmutable::< u8, f64>(); //~ ERROR not satisfied - assert::is_transmutable::< u8, u128>(); //~ ERROR not satisfied - assert::is_transmutable::< u8, i128>(); //~ ERROR not satisfied + assert::is_transmutable::< u8, i16>(); //~ ERROR cannot be safely transmuted + assert::is_transmutable::< u8, u16>(); //~ ERROR cannot be safely transmuted + assert::is_transmutable::< u8, i32>(); //~ ERROR cannot be safely transmuted + assert::is_transmutable::< u8, f32>(); //~ ERROR cannot be safely transmuted + assert::is_transmutable::< u8, u32>(); //~ ERROR cannot be safely transmuted + assert::is_transmutable::< u8, u64>(); //~ ERROR cannot be safely transmuted + assert::is_transmutable::< u8, i64>(); //~ ERROR cannot be safely transmuted + assert::is_transmutable::< u8, f64>(); //~ ERROR cannot be safely transmuted + assert::is_transmutable::< u8, u128>(); //~ ERROR cannot be safely transmuted + assert::is_transmutable::< u8, i128>(); //~ ERROR cannot be safely transmuted - assert::is_transmutable::< i16, i32>(); //~ ERROR not satisfied - assert::is_transmutable::< i16, f32>(); //~ ERROR not satisfied - assert::is_transmutable::< i16, u32>(); //~ ERROR not satisfied - assert::is_transmutable::< i16, u64>(); //~ ERROR not satisfied - assert::is_transmutable::< i16, i64>(); //~ ERROR not satisfied - assert::is_transmutable::< i16, f64>(); //~ ERROR not satisfied - assert::is_transmutable::< i16, u128>(); //~ ERROR not satisfied - assert::is_transmutable::< i16, i128>(); //~ ERROR not satisfied + assert::is_transmutable::< i16, i32>(); //~ ERROR cannot be safely transmuted + assert::is_transmutable::< i16, f32>(); //~ ERROR cannot be safely transmuted + assert::is_transmutable::< i16, u32>(); //~ ERROR cannot be safely transmuted + assert::is_transmutable::< i16, u64>(); //~ ERROR cannot be safely transmuted + assert::is_transmutable::< i16, i64>(); //~ ERROR cannot be safely transmuted + assert::is_transmutable::< i16, f64>(); //~ ERROR cannot be safely transmuted + assert::is_transmutable::< i16, u128>(); //~ ERROR cannot be safely transmuted + assert::is_transmutable::< i16, i128>(); //~ ERROR cannot be safely transmuted - assert::is_transmutable::< u16, i32>(); //~ ERROR not satisfied - assert::is_transmutable::< u16, f32>(); //~ ERROR not satisfied - assert::is_transmutable::< u16, u32>(); //~ ERROR not satisfied - assert::is_transmutable::< u16, u64>(); //~ ERROR not satisfied - assert::is_transmutable::< u16, i64>(); //~ ERROR not satisfied - assert::is_transmutable::< u16, f64>(); //~ ERROR not satisfied - assert::is_transmutable::< u16, u128>(); //~ ERROR not satisfied - assert::is_transmutable::< u16, i128>(); //~ ERROR not satisfied + assert::is_transmutable::< u16, i32>(); //~ ERROR cannot be safely transmuted + assert::is_transmutable::< u16, f32>(); //~ ERROR cannot be safely transmuted + assert::is_transmutable::< u16, u32>(); //~ ERROR cannot be safely transmuted + assert::is_transmutable::< u16, u64>(); //~ ERROR cannot be safely transmuted + assert::is_transmutable::< u16, i64>(); //~ ERROR cannot be safely transmuted + assert::is_transmutable::< u16, f64>(); //~ ERROR cannot be safely transmuted + assert::is_transmutable::< u16, u128>(); //~ ERROR cannot be safely transmuted + assert::is_transmutable::< u16, i128>(); //~ ERROR cannot be safely transmuted - assert::is_transmutable::< i32, u64>(); //~ ERROR not satisfied - assert::is_transmutable::< i32, i64>(); //~ ERROR not satisfied - assert::is_transmutable::< i32, f64>(); //~ ERROR not satisfied - assert::is_transmutable::< i32, u128>(); //~ ERROR not satisfied - assert::is_transmutable::< i32, i128>(); //~ ERROR not satisfied + assert::is_transmutable::< i32, u64>(); //~ ERROR cannot be safely transmuted + assert::is_transmutable::< i32, i64>(); //~ ERROR cannot be safely transmuted + assert::is_transmutable::< i32, f64>(); //~ ERROR cannot be safely transmuted + assert::is_transmutable::< i32, u128>(); //~ ERROR cannot be safely transmuted + assert::is_transmutable::< i32, i128>(); //~ ERROR cannot be safely transmuted - assert::is_transmutable::< f32, u64>(); //~ ERROR not satisfied - assert::is_transmutable::< f32, i64>(); //~ ERROR not satisfied - assert::is_transmutable::< f32, f64>(); //~ ERROR not satisfied - assert::is_transmutable::< f32, u128>(); //~ ERROR not satisfied - assert::is_transmutable::< f32, i128>(); //~ ERROR not satisfied + assert::is_transmutable::< f32, u64>(); //~ ERROR cannot be safely transmuted + assert::is_transmutable::< f32, i64>(); //~ ERROR cannot be safely transmuted + assert::is_transmutable::< f32, f64>(); //~ ERROR cannot be safely transmuted + assert::is_transmutable::< f32, u128>(); //~ ERROR cannot be safely transmuted + assert::is_transmutable::< f32, i128>(); //~ ERROR cannot be safely transmuted - assert::is_transmutable::< u32, u64>(); //~ ERROR not satisfied - assert::is_transmutable::< u32, i64>(); //~ ERROR not satisfied - assert::is_transmutable::< u32, f64>(); //~ ERROR not satisfied - assert::is_transmutable::< u32, u128>(); //~ ERROR not satisfied - assert::is_transmutable::< u32, i128>(); //~ ERROR not satisfied + assert::is_transmutable::< u32, u64>(); //~ ERROR cannot be safely transmuted + assert::is_transmutable::< u32, i64>(); //~ ERROR cannot be safely transmuted + assert::is_transmutable::< u32, f64>(); //~ ERROR cannot be safely transmuted + assert::is_transmutable::< u32, u128>(); //~ ERROR cannot be safely transmuted + assert::is_transmutable::< u32, i128>(); //~ ERROR cannot be safely transmuted - assert::is_transmutable::< u64, u128>(); //~ ERROR not satisfied - assert::is_transmutable::< u64, i128>(); //~ ERROR not satisfied + assert::is_transmutable::< u64, u128>(); //~ ERROR cannot be safely transmuted + assert::is_transmutable::< u64, i128>(); //~ ERROR cannot be safely transmuted - assert::is_transmutable::< i64, u128>(); //~ ERROR not satisfied - assert::is_transmutable::< i64, i128>(); //~ ERROR not satisfied + assert::is_transmutable::< i64, u128>(); //~ ERROR cannot be safely transmuted + assert::is_transmutable::< i64, i128>(); //~ ERROR cannot be safely transmuted - assert::is_transmutable::< f64, u128>(); //~ ERROR not satisfied - assert::is_transmutable::< f64, i128>(); //~ ERROR not satisfied + assert::is_transmutable::< f64, u128>(); //~ ERROR cannot be safely transmuted + assert::is_transmutable::< f64, i128>(); //~ ERROR cannot be safely transmuted } diff --git a/src/test/ui/transmutability/primitives/numbers.stderr b/src/test/ui/transmutability/primitives/numbers.stderr index 6bd3379dfd1a..9b802a444e86 100644 --- a/src/test/ui/transmutability/primitives/numbers.stderr +++ b/src/test/ui/transmutability/primitives/numbers.stderr @@ -1,9 +1,10 @@ -error[E0277]: the trait bound `i16: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `i8` cannot be safely transmuted into `i16` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:62:40 | LL | assert::is_transmutable::< i8, i16>(); - | ^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `i16` + | ^^^ `i8` cannot be safely transmuted into `i16` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `i16` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -13,12 +14,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u16: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `i8` cannot be safely transmuted into `u16` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:63:40 | LL | assert::is_transmutable::< i8, u16>(); - | ^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `u16` + | ^^^ `i8` cannot be safely transmuted into `u16` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u16` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -28,12 +30,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `i32: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `i8` cannot be safely transmuted into `i32` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:64:40 | LL | assert::is_transmutable::< i8, i32>(); - | ^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `i32` + | ^^^ `i8` cannot be safely transmuted into `i32` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `i32` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -43,12 +46,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `f32: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `i8` cannot be safely transmuted into `f32` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:65:40 | LL | assert::is_transmutable::< i8, f32>(); - | ^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `f32` + | ^^^ `i8` cannot be safely transmuted into `f32` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `f32` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -58,12 +62,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u32: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `i8` cannot be safely transmuted into `u32` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:66:40 | LL | assert::is_transmutable::< i8, u32>(); - | ^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `u32` + | ^^^ `i8` cannot be safely transmuted into `u32` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u32` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -73,12 +78,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u64: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `i8` cannot be safely transmuted into `u64` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:67:40 | LL | assert::is_transmutable::< i8, u64>(); - | ^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `u64` + | ^^^ `i8` cannot be safely transmuted into `u64` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u64` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -88,12 +94,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `i64: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `i8` cannot be safely transmuted into `i64` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:68:40 | LL | assert::is_transmutable::< i8, i64>(); - | ^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `i64` + | ^^^ `i8` cannot be safely transmuted into `i64` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `i64` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -103,12 +110,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `f64: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `i8` cannot be safely transmuted into `f64` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:69:40 | LL | assert::is_transmutable::< i8, f64>(); - | ^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `f64` + | ^^^ `i8` cannot be safely transmuted into `f64` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `f64` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -118,12 +126,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u128: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `i8` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:70:39 | LL | assert::is_transmutable::< i8, u128>(); - | ^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `u128` + | ^^^^ `i8` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u128` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -133,12 +142,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `i128: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `i8` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:71:39 | LL | assert::is_transmutable::< i8, i128>(); - | ^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `i128` + | ^^^^ `i8` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `i128` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -148,12 +158,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `i16: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `u8` cannot be safely transmuted into `i16` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:73:40 | LL | assert::is_transmutable::< u8, i16>(); - | ^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `i16` + | ^^^ `u8` cannot be safely transmuted into `i16` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `i16` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -163,12 +174,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u16: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `u8` cannot be safely transmuted into `u16` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:74:40 | LL | assert::is_transmutable::< u8, u16>(); - | ^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `u16` + | ^^^ `u8` cannot be safely transmuted into `u16` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u16` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -178,12 +190,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `i32: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `u8` cannot be safely transmuted into `i32` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:75:40 | LL | assert::is_transmutable::< u8, i32>(); - | ^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `i32` + | ^^^ `u8` cannot be safely transmuted into `i32` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `i32` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -193,12 +206,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `f32: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `u8` cannot be safely transmuted into `f32` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:76:40 | LL | assert::is_transmutable::< u8, f32>(); - | ^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `f32` + | ^^^ `u8` cannot be safely transmuted into `f32` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `f32` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -208,12 +222,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u32: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `u8` cannot be safely transmuted into `u32` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:77:40 | LL | assert::is_transmutable::< u8, u32>(); - | ^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `u32` + | ^^^ `u8` cannot be safely transmuted into `u32` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u32` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -223,12 +238,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u64: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `u8` cannot be safely transmuted into `u64` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:78:40 | LL | assert::is_transmutable::< u8, u64>(); - | ^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `u64` + | ^^^ `u8` cannot be safely transmuted into `u64` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u64` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -238,12 +254,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `i64: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `u8` cannot be safely transmuted into `i64` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:79:40 | LL | assert::is_transmutable::< u8, i64>(); - | ^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `i64` + | ^^^ `u8` cannot be safely transmuted into `i64` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `i64` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -253,12 +270,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `f64: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `u8` cannot be safely transmuted into `f64` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:80:40 | LL | assert::is_transmutable::< u8, f64>(); - | ^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `f64` + | ^^^ `u8` cannot be safely transmuted into `f64` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `f64` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -268,12 +286,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u128: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `u8` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:81:39 | LL | assert::is_transmutable::< u8, u128>(); - | ^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `u128` + | ^^^^ `u8` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u128` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -283,12 +302,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `i128: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `u8` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:82:39 | LL | assert::is_transmutable::< u8, i128>(); - | ^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `i128` + | ^^^^ `u8` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `i128` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -298,12 +318,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `i32: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `i16` cannot be safely transmuted into `i32` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:84:40 | LL | assert::is_transmutable::< i16, i32>(); - | ^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `i32` + | ^^^ `i16` cannot be safely transmuted into `i32` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `i32` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -313,12 +334,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `f32: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `i16` cannot be safely transmuted into `f32` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:85:40 | LL | assert::is_transmutable::< i16, f32>(); - | ^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `f32` + | ^^^ `i16` cannot be safely transmuted into `f32` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `f32` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -328,12 +350,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u32: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `i16` cannot be safely transmuted into `u32` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:86:40 | LL | assert::is_transmutable::< i16, u32>(); - | ^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `u32` + | ^^^ `i16` cannot be safely transmuted into `u32` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u32` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -343,12 +366,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u64: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `i16` cannot be safely transmuted into `u64` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:87:40 | LL | assert::is_transmutable::< i16, u64>(); - | ^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `u64` + | ^^^ `i16` cannot be safely transmuted into `u64` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u64` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -358,12 +382,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `i64: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `i16` cannot be safely transmuted into `i64` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:88:40 | LL | assert::is_transmutable::< i16, i64>(); - | ^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `i64` + | ^^^ `i16` cannot be safely transmuted into `i64` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `i64` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -373,12 +398,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `f64: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `i16` cannot be safely transmuted into `f64` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:89:40 | LL | assert::is_transmutable::< i16, f64>(); - | ^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `f64` + | ^^^ `i16` cannot be safely transmuted into `f64` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `f64` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -388,12 +414,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u128: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `i16` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:90:39 | LL | assert::is_transmutable::< i16, u128>(); - | ^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `u128` + | ^^^^ `i16` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u128` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -403,12 +430,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `i128: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `i16` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:91:39 | LL | assert::is_transmutable::< i16, i128>(); - | ^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `i128` + | ^^^^ `i16` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `i128` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -418,12 +446,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `i32: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `u16` cannot be safely transmuted into `i32` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:93:40 | LL | assert::is_transmutable::< u16, i32>(); - | ^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `i32` + | ^^^ `u16` cannot be safely transmuted into `i32` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `i32` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -433,12 +462,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `f32: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `u16` cannot be safely transmuted into `f32` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:94:40 | LL | assert::is_transmutable::< u16, f32>(); - | ^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `f32` + | ^^^ `u16` cannot be safely transmuted into `f32` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `f32` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -448,12 +478,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u32: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `u16` cannot be safely transmuted into `u32` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:95:40 | LL | assert::is_transmutable::< u16, u32>(); - | ^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `u32` + | ^^^ `u16` cannot be safely transmuted into `u32` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u32` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -463,12 +494,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u64: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `u16` cannot be safely transmuted into `u64` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:96:40 | LL | assert::is_transmutable::< u16, u64>(); - | ^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `u64` + | ^^^ `u16` cannot be safely transmuted into `u64` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u64` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -478,12 +510,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `i64: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `u16` cannot be safely transmuted into `i64` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:97:40 | LL | assert::is_transmutable::< u16, i64>(); - | ^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `i64` + | ^^^ `u16` cannot be safely transmuted into `i64` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `i64` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -493,12 +526,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `f64: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `u16` cannot be safely transmuted into `f64` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:98:40 | LL | assert::is_transmutable::< u16, f64>(); - | ^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `f64` + | ^^^ `u16` cannot be safely transmuted into `f64` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `f64` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -508,12 +542,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u128: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `u16` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:99:39 | LL | assert::is_transmutable::< u16, u128>(); - | ^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `u128` + | ^^^^ `u16` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u128` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -523,12 +558,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `i128: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `u16` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:100:39 | LL | assert::is_transmutable::< u16, i128>(); - | ^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `i128` + | ^^^^ `u16` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `i128` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -538,12 +574,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u64: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `i32` cannot be safely transmuted into `u64` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:102:40 | LL | assert::is_transmutable::< i32, u64>(); - | ^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `u64` + | ^^^ `i32` cannot be safely transmuted into `u64` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u64` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -553,12 +590,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `i64: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `i32` cannot be safely transmuted into `i64` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:103:40 | LL | assert::is_transmutable::< i32, i64>(); - | ^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `i64` + | ^^^ `i32` cannot be safely transmuted into `i64` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `i64` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -568,12 +606,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `f64: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `i32` cannot be safely transmuted into `f64` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:104:40 | LL | assert::is_transmutable::< i32, f64>(); - | ^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `f64` + | ^^^ `i32` cannot be safely transmuted into `f64` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `f64` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -583,12 +622,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u128: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `i32` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:105:39 | LL | assert::is_transmutable::< i32, u128>(); - | ^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `u128` + | ^^^^ `i32` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u128` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -598,12 +638,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `i128: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `i32` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:106:39 | LL | assert::is_transmutable::< i32, i128>(); - | ^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `i128` + | ^^^^ `i32` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `i128` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -613,12 +654,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u64: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `f32` cannot be safely transmuted into `u64` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:108:40 | LL | assert::is_transmutable::< f32, u64>(); - | ^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `u64` + | ^^^ `f32` cannot be safely transmuted into `u64` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u64` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -628,12 +670,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `i64: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `f32` cannot be safely transmuted into `i64` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:109:40 | LL | assert::is_transmutable::< f32, i64>(); - | ^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `i64` + | ^^^ `f32` cannot be safely transmuted into `i64` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `i64` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -643,12 +686,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `f64: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `f32` cannot be safely transmuted into `f64` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:110:40 | LL | assert::is_transmutable::< f32, f64>(); - | ^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `f64` + | ^^^ `f32` cannot be safely transmuted into `f64` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `f64` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -658,12 +702,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u128: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `f32` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:111:39 | LL | assert::is_transmutable::< f32, u128>(); - | ^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `u128` + | ^^^^ `f32` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u128` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -673,12 +718,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `i128: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `f32` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:112:39 | LL | assert::is_transmutable::< f32, i128>(); - | ^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `i128` + | ^^^^ `f32` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `i128` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -688,12 +734,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u64: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `u32` cannot be safely transmuted into `u64` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:114:40 | LL | assert::is_transmutable::< u32, u64>(); - | ^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `u64` + | ^^^ `u32` cannot be safely transmuted into `u64` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u64` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -703,12 +750,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `i64: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `u32` cannot be safely transmuted into `i64` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:115:40 | LL | assert::is_transmutable::< u32, i64>(); - | ^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `i64` + | ^^^ `u32` cannot be safely transmuted into `i64` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `i64` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -718,12 +766,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `f64: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `u32` cannot be safely transmuted into `f64` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:116:40 | LL | assert::is_transmutable::< u32, f64>(); - | ^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `f64` + | ^^^ `u32` cannot be safely transmuted into `f64` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `f64` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -733,12 +782,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u128: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `u32` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:117:39 | LL | assert::is_transmutable::< u32, u128>(); - | ^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `u128` + | ^^^^ `u32` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u128` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -748,12 +798,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `i128: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `u32` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:118:39 | LL | assert::is_transmutable::< u32, i128>(); - | ^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `i128` + | ^^^^ `u32` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `i128` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -763,12 +814,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u128: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `u64` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:120:39 | LL | assert::is_transmutable::< u64, u128>(); - | ^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `u128` + | ^^^^ `u64` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u128` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -778,12 +830,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `i128: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `u64` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:121:39 | LL | assert::is_transmutable::< u64, i128>(); - | ^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `i128` + | ^^^^ `u64` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `i128` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -793,12 +846,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u128: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `i64` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:123:39 | LL | assert::is_transmutable::< i64, u128>(); - | ^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `u128` + | ^^^^ `i64` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u128` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -808,12 +862,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `i128: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `i64` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:124:39 | LL | assert::is_transmutable::< i64, i128>(); - | ^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `i128` + | ^^^^ `i64` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `i128` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -823,12 +878,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u128: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `f64` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:126:39 | LL | assert::is_transmutable::< f64, u128>(); - | ^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `u128` + | ^^^^ `f64` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u128` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | @@ -838,12 +894,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `i128: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `f64` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. --> $DIR/numbers.rs:127:39 | LL | assert::is_transmutable::< f64, i128>(); - | ^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `i128` + | ^^^^ `f64` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `i128` note: required by a bound in `is_transmutable` --> $DIR/numbers.rs:12:14 | diff --git a/src/test/ui/transmutability/primitives/unit.rs b/src/test/ui/transmutability/primitives/unit.rs index a9c618188bf4..86d4740300df 100644 --- a/src/test/ui/transmutability/primitives/unit.rs +++ b/src/test/ui/transmutability/primitives/unit.rs @@ -20,5 +20,5 @@ fn should_have_correct_size() { struct Context; assert::is_transmutable::<(), Zst, Context>(); assert::is_transmutable::(); - assert::is_transmutable::<(), u8, Context>(); //~ ERROR not satisfied + assert::is_transmutable::<(), u8, Context>(); //~ ERROR cannot be safely transmuted } diff --git a/src/test/ui/transmutability/primitives/unit.stderr b/src/test/ui/transmutability/primitives/unit.stderr index f602612feea9..cf27c0d17b33 100644 --- a/src/test/ui/transmutability/primitives/unit.stderr +++ b/src/test/ui/transmutability/primitives/unit.stderr @@ -1,9 +1,10 @@ -error[E0277]: the trait bound `u8: BikeshedIntrinsicFrom<(), should_have_correct_size::Context, true, true, true, true>` is not satisfied +error[E0277]: `()` cannot be safely transmuted into `u8` in the defining scope of `should_have_correct_size::Context`. --> $DIR/unit.rs:23:35 | LL | assert::is_transmutable::<(), u8, Context>(); - | ^^ the trait `BikeshedIntrinsicFrom<(), should_have_correct_size::Context, true, true, true, true>` is not implemented for `u8` + | ^^ `()` cannot be safely transmuted into `u8` in the defining scope of `should_have_correct_size::Context`. | + = help: the trait `BikeshedIntrinsicFrom<(), should_have_correct_size::Context, true, true, true, true>` is not implemented for `u8` note: required by a bound in `is_transmutable` --> $DIR/unit.rs:12:14 | diff --git a/src/test/ui/transmutability/references.rs b/src/test/ui/transmutability/references.rs index c7d24aaf1caa..c6fd4c43e95c 100644 --- a/src/test/ui/transmutability/references.rs +++ b/src/test/ui/transmutability/references.rs @@ -16,5 +16,5 @@ mod assert { fn not_yet_implemented() { #[repr(C)] struct Unit; - assert::is_maybe_transmutable::<&'static Unit, &'static Unit>(); //~ ERROR not satisfied + assert::is_maybe_transmutable::<&'static Unit, &'static Unit>(); //~ ERROR cannot be safely transmuted } diff --git a/src/test/ui/transmutability/references.stderr b/src/test/ui/transmutability/references.stderr index 7199e169e297..17ffcf64177e 100644 --- a/src/test/ui/transmutability/references.stderr +++ b/src/test/ui/transmutability/references.stderr @@ -1,9 +1,10 @@ -error[E0277]: the trait bound `&'static Unit: BikeshedIntrinsicFrom<&'static Unit, assert::Context, true, true, true, true>` is not satisfied +error[E0277]: `&'static Unit` cannot be safely transmuted into `&'static Unit` in the defining scope of `assert::Context`. --> $DIR/references.rs:19:52 | LL | assert::is_maybe_transmutable::<&'static Unit, &'static Unit>(); - | ^^^^^^^^^^^^^ the trait `BikeshedIntrinsicFrom<&'static Unit, assert::Context, true, true, true, true>` is not implemented for `&'static Unit` + | ^^^^^^^^^^^^^ `&'static Unit` cannot be safely transmuted into `&'static Unit` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<&'static Unit, assert::Context, true, true, true, true>` is not implemented for `&'static Unit` note: required by a bound in `is_maybe_transmutable` --> $DIR/references.rs:13:14 | diff --git a/src/test/ui/transmutability/structs/repr/should_require_well_defined_layout.rs b/src/test/ui/transmutability/structs/repr/should_require_well_defined_layout.rs index 63419aceb6ce..556be989dbc2 100644 --- a/src/test/ui/transmutability/structs/repr/should_require_well_defined_layout.rs +++ b/src/test/ui/transmutability/structs/repr/should_require_well_defined_layout.rs @@ -18,39 +18,39 @@ fn should_reject_repr_rust() { fn unit() { struct repr_rust; - assert::is_maybe_transmutable::(); //~ ERROR not satisfied - assert::is_maybe_transmutable::(); //~ ERROR not satisfied + assert::is_maybe_transmutable::(); //~ ERROR cannot be safely transmuted + assert::is_maybe_transmutable::(); //~ ERROR cannot be safely transmuted } fn tuple() { struct repr_rust(); - assert::is_maybe_transmutable::(); //~ ERROR not satisfied - assert::is_maybe_transmutable::(); //~ ERROR not satisfied + assert::is_maybe_transmutable::(); //~ ERROR cannot be safely transmuted + assert::is_maybe_transmutable::(); //~ ERROR cannot be safely transmuted } fn braces() { struct repr_rust{} - assert::is_maybe_transmutable::(); //~ ERROR not satisfied - assert::is_maybe_transmutable::(); //~ ERROR not satisfied + assert::is_maybe_transmutable::(); //~ ERROR cannot be safely transmuted + assert::is_maybe_transmutable::(); //~ ERROR cannot be safely transmuted } fn aligned() { #[repr(align(1))] struct repr_rust{} - assert::is_maybe_transmutable::(); //~ ERROR not satisfied - assert::is_maybe_transmutable::(); //~ ERROR not satisfied + assert::is_maybe_transmutable::(); //~ ERROR cannot be safely transmuted + assert::is_maybe_transmutable::(); //~ ERROR cannot be safely transmuted } fn packed() { #[repr(packed)] struct repr_rust{} - assert::is_maybe_transmutable::(); //~ ERROR not satisfied - assert::is_maybe_transmutable::(); //~ ERROR not satisfied + assert::is_maybe_transmutable::(); //~ ERROR cannot be safely transmuted + assert::is_maybe_transmutable::(); //~ ERROR cannot be safely transmuted } fn nested() { struct repr_rust; #[repr(C)] struct repr_c(repr_rust); - assert::is_maybe_transmutable::(); //~ ERROR not satisfied - assert::is_maybe_transmutable::(); //~ ERROR not satisfied + assert::is_maybe_transmutable::(); //~ ERROR cannot be safely transmuted + assert::is_maybe_transmutable::(); //~ ERROR cannot be safely transmuted } } diff --git a/src/test/ui/transmutability/structs/repr/should_require_well_defined_layout.stderr b/src/test/ui/transmutability/structs/repr/should_require_well_defined_layout.stderr index ab582dd66880..07355f7c2ad2 100644 --- a/src/test/ui/transmutability/structs/repr/should_require_well_defined_layout.stderr +++ b/src/test/ui/transmutability/structs/repr/should_require_well_defined_layout.stderr @@ -1,9 +1,10 @@ -error[E0277]: the trait bound `(): BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `should_reject_repr_rust::unit::repr_rust` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. --> $DIR/should_require_well_defined_layout.rs:21:52 | LL | assert::is_maybe_transmutable::(); - | ^^ the trait `BikeshedIntrinsicFrom` is not implemented for `()` + | ^^ `should_reject_repr_rust::unit::repr_rust` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `()` note: required by a bound in `is_maybe_transmutable` --> $DIR/should_require_well_defined_layout.rs:13:14 | @@ -13,12 +14,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable` -error[E0277]: the trait bound `should_reject_repr_rust::unit::repr_rust: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `u128` cannot be safely transmuted into `should_reject_repr_rust::unit::repr_rust` in the defining scope of `assert::Context`. --> $DIR/should_require_well_defined_layout.rs:22:47 | LL | assert::is_maybe_transmutable::(); - | ^^^^^^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `should_reject_repr_rust::unit::repr_rust` + | ^^^^^^^^^ `u128` cannot be safely transmuted into `should_reject_repr_rust::unit::repr_rust` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `should_reject_repr_rust::unit::repr_rust` note: required by a bound in `is_maybe_transmutable` --> $DIR/should_require_well_defined_layout.rs:13:14 | @@ -28,12 +30,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable` -error[E0277]: the trait bound `(): BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `should_reject_repr_rust::tuple::repr_rust` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. --> $DIR/should_require_well_defined_layout.rs:27:52 | LL | assert::is_maybe_transmutable::(); - | ^^ the trait `BikeshedIntrinsicFrom` is not implemented for `()` + | ^^ `should_reject_repr_rust::tuple::repr_rust` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `()` note: required by a bound in `is_maybe_transmutable` --> $DIR/should_require_well_defined_layout.rs:13:14 | @@ -43,12 +46,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable` -error[E0277]: the trait bound `should_reject_repr_rust::tuple::repr_rust: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `u128` cannot be safely transmuted into `should_reject_repr_rust::tuple::repr_rust` in the defining scope of `assert::Context`. --> $DIR/should_require_well_defined_layout.rs:28:47 | LL | assert::is_maybe_transmutable::(); - | ^^^^^^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `should_reject_repr_rust::tuple::repr_rust` + | ^^^^^^^^^ `u128` cannot be safely transmuted into `should_reject_repr_rust::tuple::repr_rust` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `should_reject_repr_rust::tuple::repr_rust` note: required by a bound in `is_maybe_transmutable` --> $DIR/should_require_well_defined_layout.rs:13:14 | @@ -58,12 +62,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable` -error[E0277]: the trait bound `(): BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `should_reject_repr_rust::braces::repr_rust` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. --> $DIR/should_require_well_defined_layout.rs:33:52 | LL | assert::is_maybe_transmutable::(); - | ^^ the trait `BikeshedIntrinsicFrom` is not implemented for `()` + | ^^ `should_reject_repr_rust::braces::repr_rust` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `()` note: required by a bound in `is_maybe_transmutable` --> $DIR/should_require_well_defined_layout.rs:13:14 | @@ -73,12 +78,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable` -error[E0277]: the trait bound `should_reject_repr_rust::braces::repr_rust: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `u128` cannot be safely transmuted into `should_reject_repr_rust::braces::repr_rust` in the defining scope of `assert::Context`. --> $DIR/should_require_well_defined_layout.rs:34:47 | LL | assert::is_maybe_transmutable::(); - | ^^^^^^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `should_reject_repr_rust::braces::repr_rust` + | ^^^^^^^^^ `u128` cannot be safely transmuted into `should_reject_repr_rust::braces::repr_rust` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `should_reject_repr_rust::braces::repr_rust` note: required by a bound in `is_maybe_transmutable` --> $DIR/should_require_well_defined_layout.rs:13:14 | @@ -88,12 +94,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable` -error[E0277]: the trait bound `(): BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `aligned::repr_rust` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. --> $DIR/should_require_well_defined_layout.rs:39:52 | LL | assert::is_maybe_transmutable::(); - | ^^ the trait `BikeshedIntrinsicFrom` is not implemented for `()` + | ^^ `aligned::repr_rust` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `()` note: required by a bound in `is_maybe_transmutable` --> $DIR/should_require_well_defined_layout.rs:13:14 | @@ -103,12 +110,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable` -error[E0277]: the trait bound `aligned::repr_rust: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `u128` cannot be safely transmuted into `aligned::repr_rust` in the defining scope of `assert::Context`. --> $DIR/should_require_well_defined_layout.rs:40:47 | LL | assert::is_maybe_transmutable::(); - | ^^^^^^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `aligned::repr_rust` + | ^^^^^^^^^ `u128` cannot be safely transmuted into `aligned::repr_rust` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `aligned::repr_rust` note: required by a bound in `is_maybe_transmutable` --> $DIR/should_require_well_defined_layout.rs:13:14 | @@ -118,12 +126,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable` -error[E0277]: the trait bound `(): BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `packed::repr_rust` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. --> $DIR/should_require_well_defined_layout.rs:45:52 | LL | assert::is_maybe_transmutable::(); - | ^^ the trait `BikeshedIntrinsicFrom` is not implemented for `()` + | ^^ `packed::repr_rust` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `()` note: required by a bound in `is_maybe_transmutable` --> $DIR/should_require_well_defined_layout.rs:13:14 | @@ -133,12 +142,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable` -error[E0277]: the trait bound `packed::repr_rust: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `u128` cannot be safely transmuted into `packed::repr_rust` in the defining scope of `assert::Context`. --> $DIR/should_require_well_defined_layout.rs:46:47 | LL | assert::is_maybe_transmutable::(); - | ^^^^^^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `packed::repr_rust` + | ^^^^^^^^^ `u128` cannot be safely transmuted into `packed::repr_rust` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `packed::repr_rust` note: required by a bound in `is_maybe_transmutable` --> $DIR/should_require_well_defined_layout.rs:13:14 | @@ -148,12 +158,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable` -error[E0277]: the trait bound `(): BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `nested::repr_c` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. --> $DIR/should_require_well_defined_layout.rs:52:49 | LL | assert::is_maybe_transmutable::(); - | ^^ the trait `BikeshedIntrinsicFrom` is not implemented for `()` + | ^^ `nested::repr_c` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `()` note: required by a bound in `is_maybe_transmutable` --> $DIR/should_require_well_defined_layout.rs:13:14 | @@ -163,12 +174,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable` -error[E0277]: the trait bound `nested::repr_c: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `u128` cannot be safely transmuted into `nested::repr_c` in the defining scope of `assert::Context`. --> $DIR/should_require_well_defined_layout.rs:53:47 | LL | assert::is_maybe_transmutable::(); - | ^^^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `nested::repr_c` + | ^^^^^^ `u128` cannot be safely transmuted into `nested::repr_c` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `nested::repr_c` note: required by a bound in `is_maybe_transmutable` --> $DIR/should_require_well_defined_layout.rs:13:14 | diff --git a/src/test/ui/transmutability/unions/repr/should_require_well_defined_layout.rs b/src/test/ui/transmutability/unions/repr/should_require_well_defined_layout.rs index d6e28d7f0db3..cec8e389f444 100644 --- a/src/test/ui/transmutability/unions/repr/should_require_well_defined_layout.rs +++ b/src/test/ui/transmutability/unions/repr/should_require_well_defined_layout.rs @@ -20,8 +20,8 @@ fn should_reject_repr_rust() a: u8 } - assert::is_maybe_transmutable::(); //~ ERROR not satisfied - assert::is_maybe_transmutable::(); //~ ERROR not satisfied + assert::is_maybe_transmutable::(); //~ ERROR cannot be safely transmuted + assert::is_maybe_transmutable::(); //~ ERROR cannot be safely transmuted } fn should_accept_repr_C() diff --git a/src/test/ui/transmutability/unions/repr/should_require_well_defined_layout.stderr b/src/test/ui/transmutability/unions/repr/should_require_well_defined_layout.stderr index c24193f9a6d7..2ed01b159ab0 100644 --- a/src/test/ui/transmutability/unions/repr/should_require_well_defined_layout.stderr +++ b/src/test/ui/transmutability/unions/repr/should_require_well_defined_layout.stderr @@ -1,9 +1,10 @@ -error[E0277]: the trait bound `(): BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `should_reject_repr_rust::repr_rust` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. --> $DIR/should_require_well_defined_layout.rs:23:48 | LL | assert::is_maybe_transmutable::(); - | ^^ the trait `BikeshedIntrinsicFrom` is not implemented for `()` + | ^^ `should_reject_repr_rust::repr_rust` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `()` note: required by a bound in `is_maybe_transmutable` --> $DIR/should_require_well_defined_layout.rs:13:14 | @@ -13,12 +14,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable` -error[E0277]: the trait bound `should_reject_repr_rust::repr_rust: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `u128` cannot be safely transmuted into `should_reject_repr_rust::repr_rust` in the defining scope of `assert::Context`. --> $DIR/should_require_well_defined_layout.rs:24:43 | LL | assert::is_maybe_transmutable::(); - | ^^^^^^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `should_reject_repr_rust::repr_rust` + | ^^^^^^^^^ `u128` cannot be safely transmuted into `should_reject_repr_rust::repr_rust` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `should_reject_repr_rust::repr_rust` note: required by a bound in `is_maybe_transmutable` --> $DIR/should_require_well_defined_layout.rs:13:14 | diff --git a/src/test/ui/transmutability/unions/should_pad_variants.rs b/src/test/ui/transmutability/unions/should_pad_variants.rs index d4126693f928..c4757900f9c3 100644 --- a/src/test/ui/transmutability/unions/should_pad_variants.rs +++ b/src/test/ui/transmutability/unions/should_pad_variants.rs @@ -36,5 +36,5 @@ fn should_pad_variants() { struct Context; // If the implementation (incorrectly) fails to pad `Lopsided::smol` with // an uninitialized byte, this transmutation might be (wrongly) accepted: - assert::is_transmutable::(); //~ ERROR not satisfied + assert::is_transmutable::(); //~ ERROR cannot be safely transmuted } diff --git a/src/test/ui/transmutability/unions/should_pad_variants.stderr b/src/test/ui/transmutability/unions/should_pad_variants.stderr index b940ca077d4a..429f7211d17a 100644 --- a/src/test/ui/transmutability/unions/should_pad_variants.stderr +++ b/src/test/ui/transmutability/unions/should_pad_variants.stderr @@ -1,9 +1,10 @@ -error[E0277]: the trait bound `Dst: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `Src` cannot be safely transmuted into `Dst` in the defining scope of `should_pad_variants::Context`. --> $DIR/should_pad_variants.rs:39:36 | LL | assert::is_transmutable::(); - | ^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `Dst` + | ^^^ `Src` cannot be safely transmuted into `Dst` in the defining scope of `should_pad_variants::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `Dst` note: required by a bound in `is_transmutable` --> $DIR/should_pad_variants.rs:13:14 | diff --git a/src/test/ui/transmutability/unions/should_reject_contraction.rs b/src/test/ui/transmutability/unions/should_reject_contraction.rs index 34b31595193d..e8138d0e046c 100644 --- a/src/test/ui/transmutability/unions/should_reject_contraction.rs +++ b/src/test/ui/transmutability/unions/should_reject_contraction.rs @@ -32,5 +32,5 @@ fn test() { c: Ox01, } - assert::is_transmutable::(); //~ ERROR not satisfied + assert::is_transmutable::(); //~ ERROR cannot be safely transmuted } diff --git a/src/test/ui/transmutability/unions/should_reject_contraction.stderr b/src/test/ui/transmutability/unions/should_reject_contraction.stderr index 1465c3df2283..99f589008172 100644 --- a/src/test/ui/transmutability/unions/should_reject_contraction.stderr +++ b/src/test/ui/transmutability/unions/should_reject_contraction.stderr @@ -1,9 +1,10 @@ -error[E0277]: the trait bound `Subset: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `Superset` cannot be safely transmuted into `Subset` in the defining scope of `assert::Context`. --> $DIR/should_reject_contraction.rs:35:41 | LL | assert::is_transmutable::(); - | ^^^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `Subset` + | ^^^^^^ `Superset` cannot be safely transmuted into `Subset` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `Subset` note: required by a bound in `is_transmutable` --> $DIR/should_reject_contraction.rs:13:14 | diff --git a/src/test/ui/transmutability/unions/should_reject_disjoint.rs b/src/test/ui/transmutability/unions/should_reject_disjoint.rs index b4b06c571315..16160e29a546 100644 --- a/src/test/ui/transmutability/unions/should_reject_disjoint.rs +++ b/src/test/ui/transmutability/unions/should_reject_disjoint.rs @@ -31,6 +31,6 @@ fn test() { c: Ox01, } - assert::is_maybe_transmutable::(); //~ ERROR not satisfied - assert::is_maybe_transmutable::(); //~ ERROR not satisfied + assert::is_maybe_transmutable::(); //~ ERROR cannot be safely transmuted + assert::is_maybe_transmutable::(); //~ ERROR cannot be safely transmuted } diff --git a/src/test/ui/transmutability/unions/should_reject_disjoint.stderr b/src/test/ui/transmutability/unions/should_reject_disjoint.stderr index a140f0c506b3..5714e2bf320c 100644 --- a/src/test/ui/transmutability/unions/should_reject_disjoint.stderr +++ b/src/test/ui/transmutability/unions/should_reject_disjoint.stderr @@ -1,9 +1,10 @@ -error[E0277]: the trait bound `B: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `A` cannot be safely transmuted into `B` in the defining scope of `assert::Context`. --> $DIR/should_reject_disjoint.rs:34:40 | LL | assert::is_maybe_transmutable::(); - | ^ the trait `BikeshedIntrinsicFrom` is not implemented for `B` + | ^ `A` cannot be safely transmuted into `B` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `B` note: required by a bound in `is_maybe_transmutable` --> $DIR/should_reject_disjoint.rs:13:14 | @@ -13,12 +14,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable` -error[E0277]: the trait bound `A: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `B` cannot be safely transmuted into `A` in the defining scope of `assert::Context`. --> $DIR/should_reject_disjoint.rs:35:40 | LL | assert::is_maybe_transmutable::(); - | ^ the trait `BikeshedIntrinsicFrom` is not implemented for `A` + | ^ `B` cannot be safely transmuted into `A` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `A` note: required by a bound in `is_maybe_transmutable` --> $DIR/should_reject_disjoint.rs:13:14 | diff --git a/src/test/ui/transmutability/unions/should_reject_intersecting.rs b/src/test/ui/transmutability/unions/should_reject_intersecting.rs index 1ed7d2a0bd9a..58e399fb9622 100644 --- a/src/test/ui/transmutability/unions/should_reject_intersecting.rs +++ b/src/test/ui/transmutability/unions/should_reject_intersecting.rs @@ -33,6 +33,6 @@ fn test() { b: OxFF, } - assert::is_transmutable::(); //~ ERROR not satisfied - assert::is_transmutable::(); //~ ERROR not satisfied + assert::is_transmutable::(); //~ ERROR cannot be safely transmuted + assert::is_transmutable::(); //~ ERROR cannot be safely transmuted } diff --git a/src/test/ui/transmutability/unions/should_reject_intersecting.stderr b/src/test/ui/transmutability/unions/should_reject_intersecting.stderr index 43e642b56915..92689a5f828b 100644 --- a/src/test/ui/transmutability/unions/should_reject_intersecting.stderr +++ b/src/test/ui/transmutability/unions/should_reject_intersecting.stderr @@ -1,9 +1,10 @@ -error[E0277]: the trait bound `B: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `A` cannot be safely transmuted into `B` in the defining scope of `assert::Context`. --> $DIR/should_reject_intersecting.rs:36:34 | LL | assert::is_transmutable::(); - | ^ the trait `BikeshedIntrinsicFrom` is not implemented for `B` + | ^ `A` cannot be safely transmuted into `B` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `B` note: required by a bound in `is_transmutable` --> $DIR/should_reject_intersecting.rs:14:14 | @@ -13,12 +14,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `A: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `B` cannot be safely transmuted into `A` in the defining scope of `assert::Context`. --> $DIR/should_reject_intersecting.rs:37:34 | LL | assert::is_transmutable::(); - | ^ the trait `BikeshedIntrinsicFrom` is not implemented for `A` + | ^ `B` cannot be safely transmuted into `A` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `A` note: required by a bound in `is_transmutable` --> $DIR/should_reject_intersecting.rs:14:14 | diff --git a/src/test/ui/transmutability/visibility/should_reject_if_dst_has_private_field.rs b/src/test/ui/transmutability/visibility/should_reject_if_dst_has_private_field.rs index 04cb6885887f..fcf3f3a52780 100644 --- a/src/test/ui/transmutability/visibility/should_reject_if_dst_has_private_field.rs +++ b/src/test/ui/transmutability/visibility/should_reject_if_dst_has_private_field.rs @@ -33,5 +33,5 @@ mod dst { fn test() { struct Context; - assert::is_transmutable::(); //~ ERROR not satisfied + assert::is_transmutable::(); //~ ERROR cannot be safely transmuted } diff --git a/src/test/ui/transmutability/visibility/should_reject_if_dst_has_private_field.stderr b/src/test/ui/transmutability/visibility/should_reject_if_dst_has_private_field.stderr index 4dfbfaeafb64..85124019e7f0 100644 --- a/src/test/ui/transmutability/visibility/should_reject_if_dst_has_private_field.stderr +++ b/src/test/ui/transmutability/visibility/should_reject_if_dst_has_private_field.stderr @@ -1,9 +1,10 @@ -error[E0277]: the trait bound `Dst: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `Src` cannot be safely transmuted into `Dst` in the defining scope of `test::Context`. --> $DIR/should_reject_if_dst_has_private_field.rs:36:41 | LL | assert::is_transmutable::(); - | ^^^^^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `Dst` + | ^^^^^^^^ `Src` cannot be safely transmuted into `Dst` in the defining scope of `test::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `Dst` note: required by a bound in `is_transmutable` --> $DIR/should_reject_if_dst_has_private_field.rs:13:14 | diff --git a/src/test/ui/transmutability/visibility/should_reject_if_dst_has_private_variant.rs b/src/test/ui/transmutability/visibility/should_reject_if_dst_has_private_variant.rs index 768e7bc559ef..566b56467124 100644 --- a/src/test/ui/transmutability/visibility/should_reject_if_dst_has_private_variant.rs +++ b/src/test/ui/transmutability/visibility/should_reject_if_dst_has_private_variant.rs @@ -34,5 +34,5 @@ mod dst { fn test() { struct Context; - assert::is_transmutable::(); //~ ERROR not satisfied + assert::is_transmutable::(); //~ ERROR cannot be safely transmuted } diff --git a/src/test/ui/transmutability/visibility/should_reject_if_dst_has_private_variant.stderr b/src/test/ui/transmutability/visibility/should_reject_if_dst_has_private_variant.stderr index ed834a1bd258..0be564d93e2d 100644 --- a/src/test/ui/transmutability/visibility/should_reject_if_dst_has_private_variant.stderr +++ b/src/test/ui/transmutability/visibility/should_reject_if_dst_has_private_variant.stderr @@ -1,9 +1,10 @@ -error[E0277]: the trait bound `Dst: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `Src` cannot be safely transmuted into `Dst` in the defining scope of `test::Context`. --> $DIR/should_reject_if_dst_has_private_variant.rs:37:41 | LL | assert::is_transmutable::(); - | ^^^^^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `Dst` + | ^^^^^^^^ `Src` cannot be safely transmuted into `Dst` in the defining scope of `test::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `Dst` note: required by a bound in `is_transmutable` --> $DIR/should_reject_if_dst_has_private_variant.rs:13:14 | diff --git a/src/test/ui/transmutability/visibility/should_reject_if_dst_has_tricky_unreachable_field.rs b/src/test/ui/transmutability/visibility/should_reject_if_dst_has_tricky_unreachable_field.rs index c44fed4cce39..35fff5966c85 100644 --- a/src/test/ui/transmutability/visibility/should_reject_if_dst_has_tricky_unreachable_field.rs +++ b/src/test/ui/transmutability/visibility/should_reject_if_dst_has_tricky_unreachable_field.rs @@ -1,7 +1,7 @@ // check-pass //! NOTE: This test documents a known-bug in the implementation of the //! transmutability trait. Once fixed, the above "check-pass" header should be -//! removed, and an "ERROR not satisfied" annotation should be added at the end +//! removed, and an "ERROR cannot be safely transmuted" annotation should be added at the end //! of the line starting with `assert::is_transmutable`. //! //! Unless visibility is assumed, a transmutation should be rejected if the diff --git a/src/test/ui/transmutability/visibility/should_reject_if_dst_has_unreachable_field.rs b/src/test/ui/transmutability/visibility/should_reject_if_dst_has_unreachable_field.rs index dbef149bacc9..42799d803b02 100644 --- a/src/test/ui/transmutability/visibility/should_reject_if_dst_has_unreachable_field.rs +++ b/src/test/ui/transmutability/visibility/should_reject_if_dst_has_unreachable_field.rs @@ -35,5 +35,5 @@ mod dst { fn test() { struct Context; - assert::is_transmutable::(); //~ ERROR not satisfied + assert::is_transmutable::(); //~ ERROR cannot be safely transmuted } diff --git a/src/test/ui/transmutability/visibility/should_reject_if_dst_has_unreachable_field.stderr b/src/test/ui/transmutability/visibility/should_reject_if_dst_has_unreachable_field.stderr index 3029d6ab8eee..95c68d452010 100644 --- a/src/test/ui/transmutability/visibility/should_reject_if_dst_has_unreachable_field.stderr +++ b/src/test/ui/transmutability/visibility/should_reject_if_dst_has_unreachable_field.stderr @@ -1,9 +1,10 @@ -error[E0277]: the trait bound `Dst: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `Src` cannot be safely transmuted into `Dst` in the defining scope of `test::Context`. --> $DIR/should_reject_if_dst_has_unreachable_field.rs:38:41 | LL | assert::is_transmutable::(); - | ^^^^^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `Dst` + | ^^^^^^^^ `Src` cannot be safely transmuted into `Dst` in the defining scope of `test::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `Dst` note: required by a bound in `is_transmutable` --> $DIR/should_reject_if_dst_has_unreachable_field.rs:15:14 | diff --git a/src/test/ui/transmutability/visibility/should_reject_if_dst_has_unreachable_ty.rs b/src/test/ui/transmutability/visibility/should_reject_if_dst_has_unreachable_ty.rs index c5947eceb656..e13b32b30d96 100644 --- a/src/test/ui/transmutability/visibility/should_reject_if_dst_has_unreachable_ty.rs +++ b/src/test/ui/transmutability/visibility/should_reject_if_dst_has_unreachable_ty.rs @@ -38,5 +38,5 @@ fn test() { struct Context; assert::is_transmutable::(); //~^ ERROR `Dst` is private - //~| ERROR not satisfied + //~| ERROR cannot be safely transmuted } diff --git a/src/test/ui/transmutability/visibility/should_reject_if_dst_has_unreachable_ty.stderr b/src/test/ui/transmutability/visibility/should_reject_if_dst_has_unreachable_ty.stderr index 2fd388903214..3391839e39e0 100644 --- a/src/test/ui/transmutability/visibility/should_reject_if_dst_has_unreachable_ty.stderr +++ b/src/test/ui/transmutability/visibility/should_reject_if_dst_has_unreachable_ty.stderr @@ -10,12 +10,13 @@ note: the struct `Dst` is defined here LL | #[repr(C)] pub(self) struct Dst { | ^^^^^^^^^^^^^^^^^^^^ -error[E0277]: the trait bound `Dst: BikeshedIntrinsicFrom` is not satisfied +error[E0277]: `Src` cannot be safely transmuted into `Dst` in the defining scope of `test::Context`. --> $DIR/should_reject_if_dst_has_unreachable_ty.rs:39:41 | LL | assert::is_transmutable::(); - | ^^^^^^^^ the trait `BikeshedIntrinsicFrom` is not implemented for `Dst` + | ^^^^^^^^ `Src` cannot be safely transmuted into `Dst` in the defining scope of `test::Context`. | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `Dst` note: required by a bound in `is_transmutable` --> $DIR/should_reject_if_dst_has_unreachable_ty.rs:15:14 |