diff options
| author | Jack Wrenn <jack@wrenn.fyi> | 2022-07-21 17:53:01 +0000 |
|---|---|---|
| committer | Jack Wrenn <jack@wrenn.fyi> | 2022-07-27 17:33:57 +0000 |
| commit | 21d1ab4877c96a2b2fa802444f3a3d311a96beef (patch) | |
| tree | c6f440679d262894689c2f524d280e7eaac2d7a2 | |
| parent | 402644f72f61a28b3690a565be82d2178cd44800 (diff) | |
| download | rust-21d1ab4877c96a2b2fa802444f3a3d311a96beef.tar.gz rust-21d1ab4877c96a2b2fa802444f3a3d311a96beef.zip | |
safe transmute: add `rustc_on_unimplemented` to `BikeshedIntrinsicFrom`
ref: https://github.com/rust-lang/rust/pull/92268#discussion_r925266583
40 files changed, 486 insertions, 364 deletions
diff --git a/library/core/src/mem/transmutability.rs b/library/core/src/mem/transmutability.rs index 52342f8a0ec..820a7582b11 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 36f9ceb0da7..8e69527c186 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::<repr_rust, ()>(); //~ ERROR not satisfied - assert::is_maybe_transmutable::<u128, repr_rust>(); //~ ERROR not satisfied + assert::is_maybe_transmutable::<repr_rust, ()>(); //~ ERROR cannot be safely transmuted + assert::is_maybe_transmutable::<u128, repr_rust>(); //~ ERROR cannot be safely transmuted } fn singleton() { type repr_rust = [String; 1]; - assert::is_maybe_transmutable::<repr_rust, ()>(); //~ ERROR not satisfied - assert::is_maybe_transmutable::<u128, repr_rust>(); //~ ERROR not satisfied + assert::is_maybe_transmutable::<repr_rust, ()>(); //~ ERROR cannot be safely transmuted + assert::is_maybe_transmutable::<u128, repr_rust>(); //~ ERROR cannot be safely transmuted } fn duplex() { type repr_rust = [String; 2]; - assert::is_maybe_transmutable::<repr_rust, ()>(); //~ ERROR not satisfied - assert::is_maybe_transmutable::<u128, repr_rust>(); //~ ERROR not satisfied + assert::is_maybe_transmutable::<repr_rust, ()>(); //~ ERROR cannot be safely transmuted + assert::is_maybe_transmutable::<u128, repr_rust>(); //~ 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 109e58c4093..eae0c947d42 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::<repr_rust, ()>(); - | ^^ 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<Src, Context, true, true, true, true> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable` -error[E0277]: the trait bound `[String; 0]: BikeshedIntrinsicFrom<u128, assert::Context, true, true, true, true>` 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::<u128, repr_rust>(); - | ^^^^^^^^^ the trait `BikeshedIntrinsicFrom<u128, assert::Context, true, true, true, true>` 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<u128, assert::Context, true, true, true, true>` 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<Src, Context, true, true, true, true> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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::<repr_rust, ()>(); - | ^^ 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<Src, Context, true, true, true, true> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable` -error[E0277]: the trait bound `[String; 1]: BikeshedIntrinsicFrom<u128, assert::Context, true, true, true, true>` 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::<u128, repr_rust>(); - | ^^^^^^^^^ the trait `BikeshedIntrinsicFrom<u128, assert::Context, true, true, true, true>` 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<u128, assert::Context, true, true, true, true>` 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<Src, Context, true, true, true, true> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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::<repr_rust, ()>(); - | ^^ 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<Src, Context, true, true, true, true> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable` -error[E0277]: the trait bound `[String; 2]: BikeshedIntrinsicFrom<u128, assert::Context, true, true, true, true>` 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::<u128, repr_rust>(); - | ^^^^^^^^^ the trait `BikeshedIntrinsicFrom<u128, assert::Context, true, true, true, true>` 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<u128, assert::Context, true, true, true, true>` 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 cd411a4b838..18e02b0d2b9 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::<Smaller, Current, Context>(); //~ ERROR not satisfied + assert::is_transmutable::<Smaller, Current, Context>(); //~ ERROR cannot be safely transmuted assert::is_transmutable::<Current, Analog, Context>(); - assert::is_transmutable::<Current, Larger, Context>(); //~ ERROR not satisfied + assert::is_transmutable::<Current, Larger, Context>(); //~ ERROR cannot be safely transmuted } fn u_should_have_correct_length() { type Current = V0u8; - assert::is_transmutable::<Smaller, Current, Context>(); //~ ERROR not satisfied + assert::is_transmutable::<Smaller, Current, Context>(); //~ ERROR cannot be safely transmuted assert::is_transmutable::<Current, Analog, Context>(); - assert::is_transmutable::<Current, Larger, Context>(); //~ ERROR not satisfied + assert::is_transmutable::<Current, Larger, Context>(); //~ ERROR cannot be safely transmuted } } @@ -62,17 +62,17 @@ fn n16() { fn i_should_have_correct_length() { type Current = V0i16; - assert::is_transmutable::<Smaller, Current, Context>(); //~ ERROR not satisfied + assert::is_transmutable::<Smaller, Current, Context>(); //~ ERROR cannot be safely transmuted assert::is_transmutable::<Current, Analog, Context>(); - assert::is_transmutable::<Current, Larger, Context>(); //~ ERROR not satisfied + assert::is_transmutable::<Current, Larger, Context>(); //~ ERROR cannot be safely transmuted } fn u_should_have_correct_length() { type Current = V0u16; - assert::is_transmutable::<Smaller, Current, Context>(); //~ ERROR not satisfied + assert::is_transmutable::<Smaller, Current, Context>(); //~ ERROR cannot be safely transmuted assert::is_transmutable::<Current, Analog, Context>(); - assert::is_transmutable::<Current, Larger, Context>(); //~ ERROR not satisfied + assert::is_transmutable::<Current, Larger, Context>(); //~ ERROR cannot be safely transmuted } } @@ -86,17 +86,17 @@ fn n32() { fn i_should_have_correct_length() { type Current = V0i32; - assert::is_transmutable::<Smaller, Current, Context>(); //~ ERROR not satisfied + assert::is_transmutable::<Smaller, Current, Context>(); //~ ERROR cannot be safely transmuted assert::is_transmutable::<Current, Analog, Context>(); - assert::is_transmutable::<Current, Larger, Context>(); //~ ERROR not satisfied + assert::is_transmutable::<Current, Larger, Context>(); //~ ERROR cannot be safely transmuted } fn u_should_have_correct_length() { type Current = V0u32; - assert::is_transmutable::<Smaller, Current, Context>(); //~ ERROR not satisfied + assert::is_transmutable::<Smaller, Current, Context>(); //~ ERROR cannot be safely transmuted assert::is_transmutable::<Current, Analog, Context>(); - assert::is_transmutable::<Current, Larger, Context>(); //~ ERROR not satisfied + assert::is_transmutable::<Current, Larger, Context>(); //~ ERROR cannot be safely transmuted } } @@ -110,17 +110,17 @@ fn n64() { fn i_should_have_correct_length() { type Current = V0i64; - assert::is_transmutable::<Smaller, Current, Context>(); //~ ERROR not satisfied + assert::is_transmutable::<Smaller, Current, Context>(); //~ ERROR cannot be safely transmuted assert::is_transmutable::<Current, Analog, Context>(); - assert::is_transmutable::<Current, Larger, Context>(); //~ ERROR not satisfied + assert::is_transmutable::<Current, Larger, Context>(); //~ ERROR cannot be safely transmuted } fn u_should_have_correct_length() { type Current = V0u64; - assert::is_transmutable::<Smaller, Current, Context>(); //~ ERROR not satisfied + assert::is_transmutable::<Smaller, Current, Context>(); //~ ERROR cannot be safely transmuted assert::is_transmutable::<Current, Analog, Context>(); - assert::is_transmutable::<Current, Larger, Context>(); //~ ERROR not satisfied + assert::is_transmutable::<Current, Larger, Context>(); //~ ERROR cannot be safely transmuted } } @@ -134,16 +134,16 @@ fn nsize() { fn i_should_have_correct_length() { type Current = V0isize; - assert::is_transmutable::<Smaller, Current, Context>(); //~ ERROR not satisfied + assert::is_transmutable::<Smaller, Current, Context>(); //~ ERROR cannot be safely transmuted assert::is_transmutable::<Current, Analog, Context>(); - assert::is_transmutable::<Current, Larger, Context>(); //~ ERROR not satisfied + assert::is_transmutable::<Current, Larger, Context>(); //~ ERROR cannot be safely transmuted } fn u_should_have_correct_length() { type Current = V0usize; - assert::is_transmutable::<Smaller, Current, Context>(); //~ ERROR not satisfied + assert::is_transmutable::<Smaller, Current, Context>(); //~ ERROR cannot be safely transmuted assert::is_transmutable::<Current, Analog, Context>(); - assert::is_transmutable::<Current, Larger, Context>(); //~ ERROR not satisfied + assert::is_transmutable::<Current, Larger, Context>(); //~ 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 da24c6a021e..fa2e3b89b07 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<Zst, n8::Context, true, true, true, true>` 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::<Smaller, Current, Context>(); - | ^^^^^^^ the trait `BikeshedIntrinsicFrom<Zst, n8::Context, true, true, true, true>` is not implemented for `V0i8` + | ^^^^^^^ `Zst` cannot be safely transmuted into `V0i8` in the defining scope of `n8::Context`. | + = help: the trait `BikeshedIntrinsicFrom<Zst, n8::Context, true, true, true, true>` 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<Src, Context, true, true, true, true> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u16: BikeshedIntrinsicFrom<V0i8, n8::Context, true, true, true, true>` 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::<Current, Larger, Context>(); - | ^^^^^^ the trait `BikeshedIntrinsicFrom<V0i8, n8::Context, true, true, true, true>` is not implemented for `u16` + | ^^^^^^ `V0i8` cannot be safely transmuted into `u16` in the defining scope of `n8::Context`. | + = help: the trait `BikeshedIntrinsicFrom<V0i8, n8::Context, true, true, true, true>` 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<Src, Context, true, true, true, true> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `V0u8: BikeshedIntrinsicFrom<Zst, n8::Context, true, true, true, true>` 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::<Smaller, Current, Context>(); - | ^^^^^^^ the trait `BikeshedIntrinsicFrom<Zst, n8::Context, true, true, true, true>` is not implemented for `V0u8` + | ^^^^^^^ `Zst` cannot be safely transmuted into `V0u8` in the defining scope of `n8::Context`. | + = help: the trait `BikeshedIntrinsicFrom<Zst, n8::Context, true, true, true, true>` 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<Src, Context, true, true, true, true> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u16: BikeshedIntrinsicFrom<V0u8, n8::Context, true, true, true, true>` 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::<Current, Larger, Context>(); - | ^^^^^^ the trait `BikeshedIntrinsicFrom<V0u8, n8::Context, true, true, true, true>` is not implemented for `u16` + | ^^^^^^ `V0u8` cannot be safely transmuted into `u16` in the defining scope of `n8::Context`. | + = help: the trait `BikeshedIntrinsicFrom<V0u8, n8::Context, true, true, true, true>` 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<Src, Context, true, true, true, true> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `V0i16: BikeshedIntrinsicFrom<u8, n16::Context, true, true, true, true>` 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::<Smaller, Current, Context>(); - | ^^^^^^^ the trait `BikeshedIntrinsicFrom<u8, n16::Context, true, true, true, true>` is not implemented for `V0i16` + | ^^^^^^^ `u8` cannot be safely transmuted into `V0i16` in the defining scope of `n16::Context`. | + = help: the trait `BikeshedIntrinsicFrom<u8, n16::Context, true, true, true, true>` 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<Src, Context, true, true, true, true> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u32: BikeshedIntrinsicFrom<V0i16, n16::Context, true, true, true, true>` 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::<Current, Larger, Context>(); - | ^^^^^^ the trait `BikeshedIntrinsicFrom<V0i16, n16::Context, true, true, true, true>` is not implemented for `u32` + | ^^^^^^ `V0i16` cannot be safely transmuted into `u32` in the defining scope of `n16::Context`. | + = help: the trait `BikeshedIntrinsicFrom<V0i16, n16::Context, true, true, true, true>` 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<Src, Context, true, true, true, true> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `V0u16: BikeshedIntrinsicFrom<u8, n16::Context, true, true, true, true>` 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::<Smaller, Current, Context>(); - | ^^^^^^^ the trait `BikeshedIntrinsicFrom<u8, n16::Context, true, true, true, true>` is not implemented for `V0u16` + | ^^^^^^^ `u8` cannot be safely transmuted into `V0u16` in the defining scope of `n16::Context`. | + = help: the trait `BikeshedIntrinsicFrom<u8, n16::Context, true, true, true, true>` 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<Src, Context, true, true, true, true> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u32: BikeshedIntrinsicFrom<V0u16, n16::Context, true, true, true, true>` 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::<Current, Larger, Context>(); - | ^^^^^^ the trait `BikeshedIntrinsicFrom<V0u16, n16::Context, true, true, true, true>` is not implemented for `u32` + | ^^^^^^ `V0u16` cannot be safely transmuted into `u32` in the defining scope of `n16::Context`. | + = help: the trait `BikeshedIntrinsicFrom<V0u16, n16::Context, true, true, true, true>` 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<Src, Context, true, true, true, true> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `V0i32: BikeshedIntrinsicFrom<u16, n32::Context, true, true, true, true>` 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::<Smaller, Current, Context>(); - | ^^^^^^^ the trait `BikeshedIntrinsicFrom<u16, n32::Context, true, true, true, true>` is not implemented for `V0i32` + | ^^^^^^^ `u16` cannot be safely transmuted into `V0i32` in the defining scope of `n32::Context`. | + = help: the trait `BikeshedIntrinsicFrom<u16, n32::Context, true, true, true, true>` 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<Src, Context, true, true, true, true> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u64: BikeshedIntrinsicFrom<V0i32, n32::Context, true, true, true, true>` 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::<Current, Larger, Context>(); - | ^^^^^^ the trait `BikeshedIntrinsicFrom<V0i32, n32::Context, true, true, true, true>` is not implemented for `u64` + | ^^^^^^ `V0i32` cannot be safely transmuted into `u64` in the defining scope of `n32::Context`. | + = help: the trait `BikeshedIntrinsicFrom<V0i32, n32::Context, true, true, true, true>` 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<Src, Context, true, true, true, true> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `V0u32: BikeshedIntrinsicFrom<u16, n32::Context, true, true, true, true>` 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::<Smaller, Current, Context>(); - | ^^^^^^^ the trait `BikeshedIntrinsicFrom<u16, n32::Context, true, true, true, true>` is not implemented for `V0u32` + | ^^^^^^^ `u16` cannot be safely transmuted into `V0u32` in the defining scope of `n32::Context`. | + = help: the trait `BikeshedIntrinsicFrom<u16, n32::Context, true, true, true, true>` 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<Src, Context, true, true, true, true> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u64: BikeshedIntrinsicFrom<V0u32, n32::Context, true, true, true, true>` 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::<Current, Larger, Context>(); - | ^^^^^^ the trait `BikeshedIntrinsicFrom<V0u32, n32::Context, true, true, true, true>` is not implemented for `u64` + | ^^^^^^ `V0u32` cannot be safely transmuted into `u64` in the defining scope of `n32::Context`. | + = help: the trait `BikeshedIntrinsicFrom<V0u32, n32::Context, true, true, true, true>` 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<Src, Context, true, true, true, true> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `V0i64: BikeshedIntrinsicFrom<u32, n64::Context, true, true, true, true>` 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::<Smaller, Current, Context>(); - | ^^^^^^^ the trait `BikeshedIntrinsicFrom<u32, n64::Context, true, true, true, true>` is not implemented for `V0i64` + | ^^^^^^^ `u32` cannot be safely transmuted into `V0i64` in the defining scope of `n64::Context`. | + = help: the trait `BikeshedIntrinsicFrom<u32, n64::Context, true, true, true, true>` 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<Src, Context, true, true, true, true> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u128: BikeshedIntrinsicFrom<V0i64, n64::Context, true, true, true, true>` 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::<Current, Larger, Context>(); - | ^^^^^^ the trait `BikeshedIntrinsicFrom<V0i64, n64::Context, true, true, true, true>` is not implemented for `u128` + | ^^^^^^ `V0i64` cannot be safely transmuted into `u128` in the defining scope of `n64::Context`. | + = help: the trait `BikeshedIntrinsicFrom<V0i64, n64::Context, true, true, true, true>` 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<Src, Context, true, true, true, true> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `V0u64: BikeshedIntrinsicFrom<u32, n64::Context, true, true, true, true>` 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::<Smaller, Current, Context>(); - | ^^^^^^^ the trait `BikeshedIntrinsicFrom<u32, n64::Context, true, true, true, true>` is not implemented for `V0u64` + | ^^^^^^^ `u32` cannot be safely transmuted into `V0u64` in the defining scope of `n64::Context`. | + = help: the trait `BikeshedIntrinsicFrom<u32, n64::Context, true, true, true, true>` 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<Src, Context, true, true, true, true> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u128: BikeshedIntrinsicFrom<V0u64, n64::Context, true, true, true, true>` 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::<Current, Larger, Context>(); - | ^^^^^^ the trait `BikeshedIntrinsicFrom<V0u64, n64::Context, true, true, true, true>` is not implemented for `u128` + | ^^^^^^ `V0u64` cannot be safely transmuted into `u128` in the defining scope of `n64::Context`. | + = help: the trait `BikeshedIntrinsicFrom<V0u64, n64::Context, true, true, true, true>` 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<Src, Context, true, true, true, true> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `V0isize: BikeshedIntrinsicFrom<u8, nsize::Context, true, true, true, true>` 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::<Smaller, Current, Context>(); - | ^^^^^^^ the trait `BikeshedIntrinsicFrom<u8, nsize::Context, true, true, true, true>` is not implemented for `V0isize` + | ^^^^^^^ `u8` cannot be safely transmuted into `V0isize` in the defining scope of `nsize::Context`. | + = help: the trait `BikeshedIntrinsicFrom<u8, nsize::Context, true, true, true, true>` 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<Src, Context, true, true, true, true> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `[usize; 2]: BikeshedIntrinsicFrom<V0isize, nsize::Context, true, true, true, true>` 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::<Current, Larger, Context>(); - | ^^^^^^ the trait `BikeshedIntrinsicFrom<V0isize, nsize::Context, true, true, true, true>` 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<V0isize, nsize::Context, true, true, true, true>` 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<Src, Context, true, true, true, true> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `V0usize: BikeshedIntrinsicFrom<u8, nsize::Context, true, true, true, true>` 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::<Smaller, Current, Context>(); - | ^^^^^^^ the trait `BikeshedIntrinsicFrom<u8, nsize::Context, true, true, true, true>` is not implemented for `V0usize` + | ^^^^^^^ `u8` cannot be safely transmuted into `V0usize` in the defining scope of `nsize::Context`. | + = help: the trait `BikeshedIntrinsicFrom<u8, nsize::Context, true, true, true, true>` 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<Src, Context, true, true, true, true> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `[usize; 2]: BikeshedIntrinsicFrom<V0usize, nsize::Context, true, true, true, true>` 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::<Current, Larger, Context>(); - | ^^^^^^ the trait `BikeshedIntrinsicFrom<V0usize, nsize::Context, true, true, true, true>` 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<V0usize, nsize::Context, true, true, true, true>` 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 24a88d6ac95..978a12648f0 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::<repr_rust, ()>(); //~ ERROR not satisfied - assert::is_maybe_transmutable::<u128, repr_rust>(); //~ ERROR not satisfied + assert::is_maybe_transmutable::<repr_rust, ()>(); //~ ERROR cannot be safely transmuted + assert::is_maybe_transmutable::<u128, repr_rust>(); //~ ERROR cannot be safely transmuted } fn singleton() { enum repr_rust { V } - assert::is_maybe_transmutable::<repr_rust, ()>(); //~ ERROR not satisfied - assert::is_maybe_transmutable::<u128, repr_rust>(); //~ ERROR not satisfied + assert::is_maybe_transmutable::<repr_rust, ()>(); //~ ERROR cannot be safely transmuted + assert::is_maybe_transmutable::<u128, repr_rust>(); //~ ERROR cannot be safely transmuted } fn duplex() { enum repr_rust { A, B } - assert::is_maybe_transmutable::<repr_rust, ()>(); //~ ERROR not satisfied - assert::is_maybe_transmutable::<u128, repr_rust>(); //~ ERROR not satisfied + assert::is_maybe_transmutable::<repr_rust, ()>(); //~ ERROR cannot be safely transmuted + assert::is_maybe_transmutable::<u128, repr_rust>(); //~ 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 1bfbff68f06..3273e87c89f 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<void::repr_rust, assert::Context, true, true, true, true>` 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::<repr_rust, ()>(); - | ^^ the trait `BikeshedIntrinsicFrom<void::repr_rust, assert::Context, true, true, true, true>` is not implemented for `()` + | ^^ `void::repr_rust` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<void::repr_rust, 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:14:14 | @@ -13,12 +14,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context, true, true, true, true> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable` -error[E0277]: the trait bound `void::repr_rust: BikeshedIntrinsicFrom<u128, assert::Context, true, true, true, true>` 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::<u128, repr_rust>(); - | ^^^^^^^^^ the trait `BikeshedIntrinsicFrom<u128, assert::Context, true, true, true, true>` 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<u128, assert::Context, true, true, true, true>` 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<Src, Context, true, true, true, true> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable` -error[E0277]: the trait bound `(): BikeshedIntrinsicFrom<singleton::repr_rust, assert::Context, true, true, true, true>` 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::<repr_rust, ()>(); - | ^^ the trait `BikeshedIntrinsicFrom<singleton::repr_rust, assert::Context, true, true, true, true>` is not implemented for `()` + | ^^ `singleton::repr_rust` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<singleton::repr_rust, 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:14:14 | @@ -43,12 +46,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context, true, true, true, true> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable` -error[E0277]: the trait bound `singleton::repr_rust: BikeshedIntrinsicFrom<u128, assert::Context, true, true, true, true>` 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::<u128, repr_rust>(); - | ^^^^^^^^^ the trait `BikeshedIntrinsicFrom<u128, assert::Context, true, true, true, true>` 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<u128, assert::Context, true, true, true, true>` 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<Src, Context, true, true, true, true> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable` -error[E0277]: the trait bound `(): BikeshedIntrinsicFrom<duplex::repr_rust, assert::Context, true, true, true, true>` 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::<repr_rust, ()>(); - | ^^ the trait `BikeshedIntrinsicFrom<duplex::repr_rust, assert::Context, true, true, true, true>` is not implemented for `()` + | ^^ `duplex::repr_rust` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<duplex::repr_rust, 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:14:14 | @@ -73,12 +78,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context, true, true, true, true> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable` -error[E0277]: the trait bound `duplex::repr_rust: BikeshedIntrinsicFrom<u128, assert::Context, true, true, true, true>` 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::<u128, repr_rust>(); - | ^^^^^^^^^ the trait `BikeshedIntrinsicFrom<u128, assert::Context, true, true, true, true>` 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<u128, assert::Context, true, true, true, true>` 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 87951586523..466b6c8a15b 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::<Src, Dst, Context>(); //~ ERROR not satisfied + assert::is_transmutable::<Src, Dst, Context>(); //~ 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 b940ca077d4..429f7211d17 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<Src, should_pad_variants::Context, true, true, true, true>` 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::<Src, Dst, Context>(); - | ^^^ the trait `BikeshedIntrinsicFrom<Src, should_pad_variants::Context, true, true, true, true>` 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<Src, should_pad_variants::Context, true, true, true, true>` 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 9bab44e1d91..67a3c4e94ba 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::<Src, Expected>(); - assert::is_transmutable::<Src, Unexpected>(); //~ ERROR not satisfied + assert::is_transmutable::<Src, Unexpected>(); //~ 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 3f3335d4a1b..78023cb378a 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<Src, assert::Context, true, true, true, true>` 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::<Src, Unexpected>(); - | ^^^^^^^^^^ the trait `BikeshedIntrinsicFrom<Src, assert::Context, true, true, true, true>` is not implemented for `Unexpected` + | ^^^^^^^^^^ `Src` cannot be safely transmuted into `Unexpected` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<Src, assert::Context, true, true, true, true>` 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 13cecd1d8b7..4f79bc25337 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::<u8, bool>(); //~ ERROR not satisfied + assert::is_transmutable::<u8, bool>(); //~ ERROR cannot be safely transmuted assert::is_maybe_transmutable::<u8, bool>(); assert::is_transmutable::<bool, u8>(); } diff --git a/src/test/ui/transmutability/primitives/bool.stderr b/src/test/ui/transmutability/primitives/bool.stderr index f05bb433ec8..dc740251c87 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<u8, assert::Context, false, false, false, true>` 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::<u8, bool>(); - | ^^^^ the trait `BikeshedIntrinsicFrom<u8, assert::Context, false, false, false, true>` is not implemented for `bool` + | ^^^^ `u8` cannot be safely transmuted into `bool` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<u8, assert::Context, false, false, false, true>` 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 3dbdfab9686..a5f79065d8a 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::< 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::< 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::< 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::< 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::< 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::< 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::< u64, u128>(); //~ ERROR not satisfied - assert::is_transmutable::< u64, i128>(); //~ ERROR not satisfied - - assert::is_transmutable::< i64, u128>(); //~ ERROR not satisfied - assert::is_transmutable::< i64, i128>(); //~ ERROR not satisfied - - assert::is_transmutable::< f64, u128>(); //~ ERROR not satisfied - assert::is_transmutable::< f64, 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 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 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 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 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 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 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 cannot be safely transmuted + assert::is_transmutable::< u64, i128>(); //~ ERROR cannot be safely transmuted + + 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 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 6bd3379dfd1..9b802a444e8 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<i8, assert::Context, false, false, false, false>` 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<i8, assert::Context, false, false, false, false>` is not implemented for `i16` + | ^^^ `i8` cannot be safely transmuted into `i16` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<i8, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u16: BikeshedIntrinsicFrom<i8, assert::Context, false, false, false, false>` 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<i8, assert::Context, false, false, false, false>` is not implemented for `u16` + | ^^^ `i8` cannot be safely transmuted into `u16` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<i8, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `i32: BikeshedIntrinsicFrom<i8, assert::Context, false, false, false, false>` 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<i8, assert::Context, false, false, false, false>` is not implemented for `i32` + | ^^^ `i8` cannot be safely transmuted into `i32` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<i8, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `f32: BikeshedIntrinsicFrom<i8, assert::Context, false, false, false, false>` 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<i8, assert::Context, false, false, false, false>` is not implemented for `f32` + | ^^^ `i8` cannot be safely transmuted into `f32` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<i8, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u32: BikeshedIntrinsicFrom<i8, assert::Context, false, false, false, false>` 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<i8, assert::Context, false, false, false, false>` is not implemented for `u32` + | ^^^ `i8` cannot be safely transmuted into `u32` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<i8, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u64: BikeshedIntrinsicFrom<i8, assert::Context, false, false, false, false>` 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<i8, assert::Context, false, false, false, false>` is not implemented for `u64` + | ^^^ `i8` cannot be safely transmuted into `u64` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<i8, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `i64: BikeshedIntrinsicFrom<i8, assert::Context, false, false, false, false>` 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<i8, assert::Context, false, false, false, false>` is not implemented for `i64` + | ^^^ `i8` cannot be safely transmuted into `i64` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<i8, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `f64: BikeshedIntrinsicFrom<i8, assert::Context, false, false, false, false>` 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<i8, assert::Context, false, false, false, false>` is not implemented for `f64` + | ^^^ `i8` cannot be safely transmuted into `f64` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<i8, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u128: BikeshedIntrinsicFrom<i8, assert::Context, false, false, false, false>` 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<i8, assert::Context, false, false, false, false>` is not implemented for `u128` + | ^^^^ `i8` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<i8, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `i128: BikeshedIntrinsicFrom<i8, assert::Context, false, false, false, false>` 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<i8, assert::Context, false, false, false, false>` is not implemented for `i128` + | ^^^^ `i8` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<i8, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `i16: BikeshedIntrinsicFrom<u8, assert::Context, false, false, false, false>` 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<u8, assert::Context, false, false, false, false>` is not implemented for `i16` + | ^^^ `u8` cannot be safely transmuted into `i16` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<u8, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u16: BikeshedIntrinsicFrom<u8, assert::Context, false, false, false, false>` 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<u8, assert::Context, false, false, false, false>` is not implemented for `u16` + | ^^^ `u8` cannot be safely transmuted into `u16` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<u8, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `i32: BikeshedIntrinsicFrom<u8, assert::Context, false, false, false, false>` 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<u8, assert::Context, false, false, false, false>` is not implemented for `i32` + | ^^^ `u8` cannot be safely transmuted into `i32` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<u8, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `f32: BikeshedIntrinsicFrom<u8, assert::Context, false, false, false, false>` 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<u8, assert::Context, false, false, false, false>` is not implemented for `f32` + | ^^^ `u8` cannot be safely transmuted into `f32` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<u8, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u32: BikeshedIntrinsicFrom<u8, assert::Context, false, false, false, false>` 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<u8, assert::Context, false, false, false, false>` is not implemented for `u32` + | ^^^ `u8` cannot be safely transmuted into `u32` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<u8, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u64: BikeshedIntrinsicFrom<u8, assert::Context, false, false, false, false>` 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<u8, assert::Context, false, false, false, false>` is not implemented for `u64` + | ^^^ `u8` cannot be safely transmuted into `u64` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<u8, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `i64: BikeshedIntrinsicFrom<u8, assert::Context, false, false, false, false>` 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<u8, assert::Context, false, false, false, false>` is not implemented for `i64` + | ^^^ `u8` cannot be safely transmuted into `i64` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<u8, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `f64: BikeshedIntrinsicFrom<u8, assert::Context, false, false, false, false>` 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<u8, assert::Context, false, false, false, false>` is not implemented for `f64` + | ^^^ `u8` cannot be safely transmuted into `f64` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<u8, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u128: BikeshedIntrinsicFrom<u8, assert::Context, false, false, false, false>` 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<u8, assert::Context, false, false, false, false>` is not implemented for `u128` + | ^^^^ `u8` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<u8, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `i128: BikeshedIntrinsicFrom<u8, assert::Context, false, false, false, false>` 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<u8, assert::Context, false, false, false, false>` is not implemented for `i128` + | ^^^^ `u8` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<u8, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `i32: BikeshedIntrinsicFrom<i16, assert::Context, false, false, false, false>` 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<i16, assert::Context, false, false, false, false>` is not implemented for `i32` + | ^^^ `i16` cannot be safely transmuted into `i32` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<i16, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `f32: BikeshedIntrinsicFrom<i16, assert::Context, false, false, false, false>` 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<i16, assert::Context, false, false, false, false>` is not implemented for `f32` + | ^^^ `i16` cannot be safely transmuted into `f32` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<i16, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u32: BikeshedIntrinsicFrom<i16, assert::Context, false, false, false, false>` 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<i16, assert::Context, false, false, false, false>` is not implemented for `u32` + | ^^^ `i16` cannot be safely transmuted into `u32` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<i16, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u64: BikeshedIntrinsicFrom<i16, assert::Context, false, false, false, false>` 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<i16, assert::Context, false, false, false, false>` is not implemented for `u64` + | ^^^ `i16` cannot be safely transmuted into `u64` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<i16, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `i64: BikeshedIntrinsicFrom<i16, assert::Context, false, false, false, false>` 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<i16, assert::Context, false, false, false, false>` is not implemented for `i64` + | ^^^ `i16` cannot be safely transmuted into `i64` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<i16, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `f64: BikeshedIntrinsicFrom<i16, assert::Context, false, false, false, false>` 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<i16, assert::Context, false, false, false, false>` is not implemented for `f64` + | ^^^ `i16` cannot be safely transmuted into `f64` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<i16, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u128: BikeshedIntrinsicFrom<i16, assert::Context, false, false, false, false>` 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<i16, assert::Context, false, false, false, false>` is not implemented for `u128` + | ^^^^ `i16` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<i16, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `i128: BikeshedIntrinsicFrom<i16, assert::Context, false, false, false, false>` 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<i16, assert::Context, false, false, false, false>` is not implemented for `i128` + | ^^^^ `i16` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<i16, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `i32: BikeshedIntrinsicFrom<u16, assert::Context, false, false, false, false>` 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<u16, assert::Context, false, false, false, false>` is not implemented for `i32` + | ^^^ `u16` cannot be safely transmuted into `i32` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<u16, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `f32: BikeshedIntrinsicFrom<u16, assert::Context, false, false, false, false>` 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<u16, assert::Context, false, false, false, false>` is not implemented for `f32` + | ^^^ `u16` cannot be safely transmuted into `f32` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<u16, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u32: BikeshedIntrinsicFrom<u16, assert::Context, false, false, false, false>` 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<u16, assert::Context, false, false, false, false>` is not implemented for `u32` + | ^^^ `u16` cannot be safely transmuted into `u32` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<u16, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u64: BikeshedIntrinsicFrom<u16, assert::Context, false, false, false, false>` 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<u16, assert::Context, false, false, false, false>` is not implemented for `u64` + | ^^^ `u16` cannot be safely transmuted into `u64` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<u16, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `i64: BikeshedIntrinsicFrom<u16, assert::Context, false, false, false, false>` 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<u16, assert::Context, false, false, false, false>` is not implemented for `i64` + | ^^^ `u16` cannot be safely transmuted into `i64` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<u16, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `f64: BikeshedIntrinsicFrom<u16, assert::Context, false, false, false, false>` 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<u16, assert::Context, false, false, false, false>` is not implemented for `f64` + | ^^^ `u16` cannot be safely transmuted into `f64` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<u16, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u128: BikeshedIntrinsicFrom<u16, assert::Context, false, false, false, false>` 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<u16, assert::Context, false, false, false, false>` is not implemented for `u128` + | ^^^^ `u16` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<u16, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `i128: BikeshedIntrinsicFrom<u16, assert::Context, false, false, false, false>` 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<u16, assert::Context, false, false, false, false>` is not implemented for `i128` + | ^^^^ `u16` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<u16, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u64: BikeshedIntrinsicFrom<i32, assert::Context, false, false, false, false>` 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<i32, assert::Context, false, false, false, false>` is not implemented for `u64` + | ^^^ `i32` cannot be safely transmuted into `u64` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<i32, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `i64: BikeshedIntrinsicFrom<i32, assert::Context, false, false, false, false>` 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<i32, assert::Context, false, false, false, false>` is not implemented for `i64` + | ^^^ `i32` cannot be safely transmuted into `i64` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<i32, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `f64: BikeshedIntrinsicFrom<i32, assert::Context, false, false, false, false>` 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<i32, assert::Context, false, false, false, false>` is not implemented for `f64` + | ^^^ `i32` cannot be safely transmuted into `f64` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<i32, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u128: BikeshedIntrinsicFrom<i32, assert::Context, false, false, false, false>` 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<i32, assert::Context, false, false, false, false>` is not implemented for `u128` + | ^^^^ `i32` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<i32, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `i128: BikeshedIntrinsicFrom<i32, assert::Context, false, false, false, false>` 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<i32, assert::Context, false, false, false, false>` is not implemented for `i128` + | ^^^^ `i32` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<i32, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u64: BikeshedIntrinsicFrom<f32, assert::Context, false, false, false, false>` 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<f32, assert::Context, false, false, false, false>` is not implemented for `u64` + | ^^^ `f32` cannot be safely transmuted into `u64` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<f32, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `i64: BikeshedIntrinsicFrom<f32, assert::Context, false, false, false, false>` 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<f32, assert::Context, false, false, false, false>` is not implemented for `i64` + | ^^^ `f32` cannot be safely transmuted into `i64` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<f32, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `f64: BikeshedIntrinsicFrom<f32, assert::Context, false, false, false, false>` 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<f32, assert::Context, false, false, false, false>` is not implemented for `f64` + | ^^^ `f32` cannot be safely transmuted into `f64` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<f32, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u128: BikeshedIntrinsicFrom<f32, assert::Context, false, false, false, false>` 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<f32, assert::Context, false, false, false, false>` is not implemented for `u128` + | ^^^^ `f32` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<f32, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `i128: BikeshedIntrinsicFrom<f32, assert::Context, false, false, false, false>` 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<f32, assert::Context, false, false, false, false>` is not implemented for `i128` + | ^^^^ `f32` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<f32, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u64: BikeshedIntrinsicFrom<u32, assert::Context, false, false, false, false>` 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<u32, assert::Context, false, false, false, false>` is not implemented for `u64` + | ^^^ `u32` cannot be safely transmuted into `u64` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<u32, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `i64: BikeshedIntrinsicFrom<u32, assert::Context, false, false, false, false>` 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<u32, assert::Context, false, false, false, false>` is not implemented for `i64` + | ^^^ `u32` cannot be safely transmuted into `i64` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<u32, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `f64: BikeshedIntrinsicFrom<u32, assert::Context, false, false, false, false>` 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<u32, assert::Context, false, false, false, false>` is not implemented for `f64` + | ^^^ `u32` cannot be safely transmuted into `f64` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<u32, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u128: BikeshedIntrinsicFrom<u32, assert::Context, false, false, false, false>` 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<u32, assert::Context, false, false, false, false>` is not implemented for `u128` + | ^^^^ `u32` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<u32, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `i128: BikeshedIntrinsicFrom<u32, assert::Context, false, false, false, false>` 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<u32, assert::Context, false, false, false, false>` is not implemented for `i128` + | ^^^^ `u32` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<u32, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u128: BikeshedIntrinsicFrom<u64, assert::Context, false, false, false, false>` 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<u64, assert::Context, false, false, false, false>` is not implemented for `u128` + | ^^^^ `u64` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<u64, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `i128: BikeshedIntrinsicFrom<u64, assert::Context, false, false, false, false>` 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<u64, assert::Context, false, false, false, false>` is not implemented for `i128` + | ^^^^ `u64` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<u64, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u128: BikeshedIntrinsicFrom<i64, assert::Context, false, false, false, false>` 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<i64, assert::Context, false, false, false, false>` is not implemented for `u128` + | ^^^^ `i64` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<i64, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `i128: BikeshedIntrinsicFrom<i64, assert::Context, false, false, false, false>` 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<i64, assert::Context, false, false, false, false>` is not implemented for `i128` + | ^^^^ `i64` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<i64, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `u128: BikeshedIntrinsicFrom<f64, assert::Context, false, false, false, false>` 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<f64, assert::Context, false, false, false, false>` is not implemented for `u128` + | ^^^^ `f64` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<f64, assert::Context, false, false, false, false>` 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<Src, Context, false, false, false, false> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `i128: BikeshedIntrinsicFrom<f64, assert::Context, false, false, false, false>` 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<f64, assert::Context, false, false, false, false>` is not implemented for `i128` + | ^^^^ `f64` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<f64, assert::Context, false, false, false, false>` 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 a9c618188bf..86d4740300d 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::<Zst, (), Context>(); - 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 f602612feea..cf27c0d17b3 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 c7d24aaf1ca..c6fd4c43e95 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 7199e169e29..17ffcf64177 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 63419aceb6c..556be989dbc 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::<repr_rust, ()>(); //~ ERROR not satisfied - assert::is_maybe_transmutable::<u128, repr_rust>(); //~ ERROR not satisfied + assert::is_maybe_transmutable::<repr_rust, ()>(); //~ ERROR cannot be safely transmuted + assert::is_maybe_transmutable::<u128, repr_rust>(); //~ ERROR cannot be safely transmuted } fn tuple() { struct repr_rust(); - assert::is_maybe_transmutable::<repr_rust, ()>(); //~ ERROR not satisfied - assert::is_maybe_transmutable::<u128, repr_rust>(); //~ ERROR not satisfied + assert::is_maybe_transmutable::<repr_rust, ()>(); //~ ERROR cannot be safely transmuted + assert::is_maybe_transmutable::<u128, repr_rust>(); //~ ERROR cannot be safely transmuted } fn braces() { struct repr_rust{} - assert::is_maybe_transmutable::<repr_rust, ()>(); //~ ERROR not satisfied - assert::is_maybe_transmutable::<u128, repr_rust>(); //~ ERROR not satisfied + assert::is_maybe_transmutable::<repr_rust, ()>(); //~ ERROR cannot be safely transmuted + assert::is_maybe_transmutable::<u128, repr_rust>(); //~ ERROR cannot be safely transmuted } fn aligned() { #[repr(align(1))] struct repr_rust{} - assert::is_maybe_transmutable::<repr_rust, ()>(); //~ ERROR not satisfied - assert::is_maybe_transmutable::<u128, repr_rust>(); //~ ERROR not satisfied + assert::is_maybe_transmutable::<repr_rust, ()>(); //~ ERROR cannot be safely transmuted + assert::is_maybe_transmutable::<u128, repr_rust>(); //~ ERROR cannot be safely transmuted } fn packed() { #[repr(packed)] struct repr_rust{} - assert::is_maybe_transmutable::<repr_rust, ()>(); //~ ERROR not satisfied - assert::is_maybe_transmutable::<u128, repr_rust>(); //~ ERROR not satisfied + assert::is_maybe_transmutable::<repr_rust, ()>(); //~ ERROR cannot be safely transmuted + assert::is_maybe_transmutable::<u128, repr_rust>(); //~ ERROR cannot be safely transmuted } fn nested() { struct repr_rust; #[repr(C)] struct repr_c(repr_rust); - assert::is_maybe_transmutable::<repr_c, ()>(); //~ ERROR not satisfied - assert::is_maybe_transmutable::<u128, repr_c>(); //~ ERROR not satisfied + assert::is_maybe_transmutable::<repr_c, ()>(); //~ ERROR cannot be safely transmuted + assert::is_maybe_transmutable::<u128, repr_c>(); //~ 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 ab582dd6688..07355f7c2ad 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<should_reject_repr_rust::unit::repr_rust, assert::Context, true, true, true, true>` 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::<repr_rust, ()>(); - | ^^ the trait `BikeshedIntrinsicFrom<should_reject_repr_rust::unit::repr_rust, assert::Context, true, true, true, true>` 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<should_reject_repr_rust::unit::repr_rust, 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<Src, Context, true, true, true, true> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable` -error[E0277]: the trait bound `should_reject_repr_rust::unit::repr_rust: BikeshedIntrinsicFrom<u128, assert::Context, true, true, true, true>` 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::<u128, repr_rust>(); - | ^^^^^^^^^ the trait `BikeshedIntrinsicFrom<u128, assert::Context, true, true, true, true>` 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<u128, assert::Context, true, true, true, true>` 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<Src, Context, true, true, true, true> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable` -error[E0277]: the trait bound `(): BikeshedIntrinsicFrom<should_reject_repr_rust::tuple::repr_rust, assert::Context, true, true, true, true>` 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::<repr_rust, ()>(); - | ^^ the trait `BikeshedIntrinsicFrom<should_reject_repr_rust::tuple::repr_rust, assert::Context, true, true, true, true>` 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<should_reject_repr_rust::tuple::repr_rust, 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<Src, Context, true, true, true, true> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable` -error[E0277]: the trait bound `should_reject_repr_rust::tuple::repr_rust: BikeshedIntrinsicFrom<u128, assert::Context, true, true, true, true>` 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::<u128, repr_rust>(); - | ^^^^^^^^^ the trait `BikeshedIntrinsicFrom<u128, assert::Context, true, true, true, true>` 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<u128, assert::Context, true, true, true, true>` 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<Src, Context, true, true, true, true> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable` -error[E0277]: the trait bound `(): BikeshedIntrinsicFrom<should_reject_repr_rust::braces::repr_rust, assert::Context, true, true, true, true>` 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::<repr_rust, ()>(); - | ^^ the trait `BikeshedIntrinsicFrom<should_reject_repr_rust::braces::repr_rust, assert::Context, true, true, true, true>` 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<should_reject_repr_rust::braces::repr_rust, 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<Src, Context, true, true, true, true> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable` -error[E0277]: the trait bound `should_reject_repr_rust::braces::repr_rust: BikeshedIntrinsicFrom<u128, assert::Context, true, true, true, true>` 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::<u128, repr_rust>(); - | ^^^^^^^^^ the trait `BikeshedIntrinsicFrom<u128, assert::Context, true, true, true, true>` 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<u128, assert::Context, true, true, true, true>` 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<Src, Context, true, true, true, true> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable` -error[E0277]: the trait bound `(): BikeshedIntrinsicFrom<aligned::repr_rust, assert::Context, true, true, true, true>` 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::<repr_rust, ()>(); - | ^^ the trait `BikeshedIntrinsicFrom<aligned::repr_rust, assert::Context, true, true, true, true>` is not implemented for `()` + | ^^ `aligned::repr_rust` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<aligned::repr_rust, 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 | @@ -103,12 +110,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context, true, true, true, true> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable` -error[E0277]: the trait bound `aligned::repr_rust: BikeshedIntrinsicFrom<u128, assert::Context, true, true, true, true>` 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::<u128, repr_rust>(); - | ^^^^^^^^^ the trait `BikeshedIntrinsicFrom<u128, assert::Context, true, true, true, true>` 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<u128, assert::Context, true, true, true, true>` 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<Src, Context, true, true, true, true> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable` -error[E0277]: the trait bound `(): BikeshedIntrinsicFrom<packed::repr_rust, assert::Context, true, true, true, true>` 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::<repr_rust, ()>(); - | ^^ the trait `BikeshedIntrinsicFrom<packed::repr_rust, assert::Context, true, true, true, true>` is not implemented for `()` + | ^^ `packed::repr_rust` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<packed::repr_rust, 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 | @@ -133,12 +142,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context, true, true, true, true> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable` -error[E0277]: the trait bound `packed::repr_rust: BikeshedIntrinsicFrom<u128, assert::Context, true, true, true, true>` 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::<u128, repr_rust>(); - | ^^^^^^^^^ the trait `BikeshedIntrinsicFrom<u128, assert::Context, true, true, true, true>` 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<u128, assert::Context, true, true, true, true>` 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<Src, Context, true, true, true, true> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable` -error[E0277]: the trait bound `(): BikeshedIntrinsicFrom<nested::repr_c, assert::Context, true, true, true, true>` 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::<repr_c, ()>(); - | ^^ the trait `BikeshedIntrinsicFrom<nested::repr_c, assert::Context, true, true, true, true>` is not implemented for `()` + | ^^ `nested::repr_c` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<nested::repr_c, 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 | @@ -163,12 +174,13 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context, true, true, true, true> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable` -error[E0277]: the trait bound `nested::repr_c: BikeshedIntrinsicFrom<u128, assert::Context, true, true, true, true>` 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::<u128, repr_c>(); - | ^^^^^^ the trait `BikeshedIntrinsicFrom<u128, assert::Context, true, true, true, true>` 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<u128, assert::Context, true, true, true, true>` 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 d6e28d7f0db..cec8e389f44 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::<repr_rust, ()>(); //~ ERROR not satisfied - assert::is_maybe_transmutable::<u128, repr_rust>(); //~ ERROR not satisfied + assert::is_maybe_transmutable::<repr_rust, ()>(); //~ ERROR cannot be safely transmuted + assert::is_maybe_transmutable::<u128, repr_rust>(); //~ 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 c24193f9a6d..2ed01b159ab 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<should_reject_repr_rust::repr_rust, assert::Context, true, true, true, true>` 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::<repr_rust, ()>(); - | ^^ the trait `BikeshedIntrinsicFrom<should_reject_repr_rust::repr_rust, assert::Context, true, true, true, true>` 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<should_reject_repr_rust::repr_rust, 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<Src, Context, true, true, true, true> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable` -error[E0277]: the trait bound `should_reject_repr_rust::repr_rust: BikeshedIntrinsicFrom<u128, assert::Context, true, true, true, true>` 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::<u128, repr_rust>(); - | ^^^^^^^^^ the trait `BikeshedIntrinsicFrom<u128, assert::Context, true, true, true, true>` 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<u128, assert::Context, true, true, true, true>` 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 d4126693f92..c4757900f9c 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::<Src, Dst, Context>(); //~ ERROR not satisfied + assert::is_transmutable::<Src, Dst, Context>(); //~ 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 b940ca077d4..429f7211d17 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<Src, should_pad_variants::Context, true, true, true, true>` 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::<Src, Dst, Context>(); - | ^^^ the trait `BikeshedIntrinsicFrom<Src, should_pad_variants::Context, true, true, true, true>` 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<Src, should_pad_variants::Context, true, true, true, true>` 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 34b31595193..e8138d0e046 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::<Superset, Subset>(); //~ ERROR not satisfied + assert::is_transmutable::<Superset, Subset>(); //~ 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 1465c3df228..99f58900817 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<Superset, assert::Context, false, false, false, true>` 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::<Superset, Subset>(); - | ^^^^^^ the trait `BikeshedIntrinsicFrom<Superset, assert::Context, false, false, false, true>` is not implemented for `Subset` + | ^^^^^^ `Superset` cannot be safely transmuted into `Subset` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<Superset, assert::Context, false, false, false, true>` 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 b4b06c57131..16160e29a54 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::<A, B>(); //~ ERROR not satisfied - assert::is_maybe_transmutable::<B, A>(); //~ ERROR not satisfied + assert::is_maybe_transmutable::<A, B>(); //~ ERROR cannot be safely transmuted + assert::is_maybe_transmutable::<B, A>(); //~ 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 a140f0c506b..5714e2bf320 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<A, assert::Context, false, false, true, true>` 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::<A, B>(); - | ^ the trait `BikeshedIntrinsicFrom<A, assert::Context, false, false, true, true>` is not implemented for `B` + | ^ `A` cannot be safely transmuted into `B` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<A, assert::Context, false, false, true, true>` 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<Src, Context, false, false, true, true> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable` -error[E0277]: the trait bound `A: BikeshedIntrinsicFrom<B, assert::Context, false, false, true, true>` 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::<B, A>(); - | ^ the trait `BikeshedIntrinsicFrom<B, assert::Context, false, false, true, true>` is not implemented for `A` + | ^ `B` cannot be safely transmuted into `A` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<B, assert::Context, false, false, true, true>` 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 1ed7d2a0bd9..58e399fb962 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::<A, B>(); //~ ERROR not satisfied - assert::is_transmutable::<B, A>(); //~ ERROR not satisfied + assert::is_transmutable::<A, B>(); //~ ERROR cannot be safely transmuted + assert::is_transmutable::<B, A>(); //~ 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 43e642b5691..92689a5f828 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<A, assert::Context, false, false, false, true>` 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::<A, B>(); - | ^ the trait `BikeshedIntrinsicFrom<A, assert::Context, false, false, false, true>` is not implemented for `B` + | ^ `A` cannot be safely transmuted into `B` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<A, assert::Context, false, false, false, true>` 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<Src, Context, false, false, false, true> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: the trait bound `A: BikeshedIntrinsicFrom<B, assert::Context, false, false, false, true>` 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::<B, A>(); - | ^ the trait `BikeshedIntrinsicFrom<B, assert::Context, false, false, false, true>` is not implemented for `A` + | ^ `B` cannot be safely transmuted into `A` in the defining scope of `assert::Context`. | + = help: the trait `BikeshedIntrinsicFrom<B, assert::Context, false, false, false, true>` 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 04cb6885887..fcf3f3a5278 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::<src::Src, dst::Dst, Context>(); //~ ERROR not satisfied + assert::is_transmutable::<src::Src, dst::Dst, Context>(); //~ 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 4dfbfaeafb6..85124019e7f 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<Src, test::Context, false, false, false, false>` 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::<src::Src, dst::Dst, Context>(); - | ^^^^^^^^ the trait `BikeshedIntrinsicFrom<Src, test::Context, false, false, false, false>` is not implemented for `Dst` + | ^^^^^^^^ `Src` cannot be safely transmuted into `Dst` in the defining scope of `test::Context`. | + = help: the trait `BikeshedIntrinsicFrom<Src, test::Context, false, false, false, false>` 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 768e7bc559e..566b5646712 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::<src::Src, dst::Dst, Context>(); //~ ERROR not satisfied + assert::is_transmutable::<src::Src, dst::Dst, Context>(); //~ 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 ed834a1bd25..0be564d93e2 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<Src, test::Context, false, false, false, false>` 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::<src::Src, dst::Dst, Context>(); - | ^^^^^^^^ the trait `BikeshedIntrinsicFrom<Src, test::Context, false, false, false, false>` is not implemented for `Dst` + | ^^^^^^^^ `Src` cannot be safely transmuted into `Dst` in the defining scope of `test::Context`. | + = help: the trait `BikeshedIntrinsicFrom<Src, test::Context, false, false, false, false>` 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 c44fed4cce3..35fff5966c8 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 dbef149bacc..42799d803b0 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::<src::Src, dst::Dst, Context>(); //~ ERROR not satisfied + assert::is_transmutable::<src::Src, dst::Dst, Context>(); //~ 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 3029d6ab8ee..95c68d45201 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<Src, test::Context, false, false, false, false>` 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::<src::Src, dst::Dst, Context>(); - | ^^^^^^^^ the trait `BikeshedIntrinsicFrom<Src, test::Context, false, false, false, false>` is not implemented for `Dst` + | ^^^^^^^^ `Src` cannot be safely transmuted into `Dst` in the defining scope of `test::Context`. | + = help: the trait `BikeshedIntrinsicFrom<Src, test::Context, false, false, false, false>` 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 c5947eceb65..e13b32b30d9 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::<src::Src, dst::Dst, Context>(); //~^ 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 2fd38890321..3391839e39e 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<Src, test::Context, false, false, false, false>` 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::<src::Src, dst::Dst, Context>(); - | ^^^^^^^^ the trait `BikeshedIntrinsicFrom<Src, test::Context, false, false, false, false>` is not implemented for `Dst` + | ^^^^^^^^ `Src` cannot be safely transmuted into `Dst` in the defining scope of `test::Context`. | + = help: the trait `BikeshedIntrinsicFrom<Src, test::Context, false, false, false, false>` is not implemented for `Dst` note: required by a bound in `is_transmutable` --> $DIR/should_reject_if_dst_has_unreachable_ty.rs:15:14 | |
