diff options
Diffstat (limited to 'tests/ui/transmutability')
29 files changed, 1301 insertions, 481 deletions
diff --git a/tests/ui/transmutability/arrays/should_require_well_defined_layout.stderr b/tests/ui/transmutability/arrays/should_require_well_defined_layout.stderr index 164e88ede..1a0a5d3ae 100644 --- a/tests/ui/transmutability/arrays/should_require_well_defined_layout.stderr +++ b/tests/ui/transmutability/arrays/should_require_well_defined_layout.stderr @@ -1,10 +1,9 @@ -error[E0277]: `[String; 0]` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. +error[E0277]: `[String; 0]` cannot be safely transmuted into `()` in the defining scope of `assert::Context` --> $DIR/should_require_well_defined_layout.rs:26:52 | LL | assert::is_maybe_transmutable::<repr_rust, ()>(); - | ^^ `[String; 0]` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. + | ^^ `[String; 0]` does not have a well-specified layout | - = help: the trait `BikeshedIntrinsicFrom<[String; 0], assert::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: true }>` is not implemented for `()` note: required by a bound in `is_maybe_transmutable` --> $DIR/should_require_well_defined_layout.rs:13:14 | @@ -20,13 +19,12 @@ LL | | .and(Assume::VALIDITY) LL | | }> | |__________^ required by this bound in `is_maybe_transmutable` -error[E0277]: `u128` cannot be safely transmuted into `[String; 0]` in the defining scope of `assert::Context`. +error[E0277]: `u128` cannot be safely transmuted into `[String; 0]` in the defining scope of `assert::Context` --> $DIR/should_require_well_defined_layout.rs:27:47 | LL | assert::is_maybe_transmutable::<u128, repr_rust>(); - | ^^^^^^^^^ `u128` cannot be safely transmuted into `[String; 0]` in the defining scope of `assert::Context`. + | ^^^^^^^^^ `[String; 0]` does not have a well-specified layout | - = help: the trait `BikeshedIntrinsicFrom<u128, assert::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: 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 | @@ -42,13 +40,12 @@ LL | | .and(Assume::VALIDITY) LL | | }> | |__________^ required by this bound in `is_maybe_transmutable` -error[E0277]: `[String; 1]` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. +error[E0277]: `[String; 1]` cannot be safely transmuted into `()` in the defining scope of `assert::Context` --> $DIR/should_require_well_defined_layout.rs:32:52 | LL | assert::is_maybe_transmutable::<repr_rust, ()>(); - | ^^ `[String; 1]` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. + | ^^ `[String; 1]` does not have a well-specified layout | - = help: the trait `BikeshedIntrinsicFrom<[String; 1], assert::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: true }>` is not implemented for `()` note: required by a bound in `is_maybe_transmutable` --> $DIR/should_require_well_defined_layout.rs:13:14 | @@ -64,13 +61,12 @@ LL | | .and(Assume::VALIDITY) LL | | }> | |__________^ required by this bound in `is_maybe_transmutable` -error[E0277]: `u128` cannot be safely transmuted into `[String; 1]` in the defining scope of `assert::Context`. +error[E0277]: `u128` cannot be safely transmuted into `[String; 1]` in the defining scope of `assert::Context` --> $DIR/should_require_well_defined_layout.rs:33:47 | LL | assert::is_maybe_transmutable::<u128, repr_rust>(); - | ^^^^^^^^^ `u128` cannot be safely transmuted into `[String; 1]` in the defining scope of `assert::Context`. + | ^^^^^^^^^ `[String; 1]` does not have a well-specified layout | - = help: the trait `BikeshedIntrinsicFrom<u128, assert::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: 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 | @@ -86,13 +82,12 @@ LL | | .and(Assume::VALIDITY) LL | | }> | |__________^ required by this bound in `is_maybe_transmutable` -error[E0277]: `[String; 2]` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. +error[E0277]: `[String; 2]` cannot be safely transmuted into `()` in the defining scope of `assert::Context` --> $DIR/should_require_well_defined_layout.rs:38:52 | LL | assert::is_maybe_transmutable::<repr_rust, ()>(); - | ^^ `[String; 2]` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. + | ^^ `[String; 2]` does not have a well-specified layout | - = help: the trait `BikeshedIntrinsicFrom<[String; 2], assert::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: true }>` is not implemented for `()` note: required by a bound in `is_maybe_transmutable` --> $DIR/should_require_well_defined_layout.rs:13:14 | @@ -108,13 +103,12 @@ LL | | .and(Assume::VALIDITY) LL | | }> | |__________^ required by this bound in `is_maybe_transmutable` -error[E0277]: `u128` cannot be safely transmuted into `[String; 2]` in the defining scope of `assert::Context`. +error[E0277]: `u128` cannot be safely transmuted into `[String; 2]` in the defining scope of `assert::Context` --> $DIR/should_require_well_defined_layout.rs:39:47 | LL | assert::is_maybe_transmutable::<u128, repr_rust>(); - | ^^^^^^^^^ `u128` cannot be safely transmuted into `[String; 2]` in the defining scope of `assert::Context`. + | ^^^^^^^^^ `[String; 2]` does not have a well-specified layout | - = help: the trait `BikeshedIntrinsicFrom<u128, assert::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: 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/tests/ui/transmutability/enums/repr/primitive_reprs_should_have_correct_length.stderr b/tests/ui/transmutability/enums/repr/primitive_reprs_should_have_correct_length.stderr index 0f0f77f16..9877a6606 100644 --- a/tests/ui/transmutability/enums/repr/primitive_reprs_should_have_correct_length.stderr +++ b/tests/ui/transmutability/enums/repr/primitive_reprs_should_have_correct_length.stderr @@ -1,10 +1,9 @@ -error[E0277]: `Zst` cannot be safely transmuted into `V0i8` in the defining scope of `n8::Context`. +error[E0277]: `Zst` cannot be safely transmuted into `V0i8` in the defining scope of `n8::Context` --> $DIR/primitive_reprs_should_have_correct_length.rs:48:44 | LL | assert::is_transmutable::<Smaller, Current, Context>(); - | ^^^^^^^ `Zst` cannot be safely transmuted into `V0i8` in the defining scope of `n8::Context`. + | ^^^^^^^ The size of `Zst` is smaller than the size of `V0i8` | - = help: the trait `BikeshedIntrinsicFrom<Zst, n8::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: true }>` is not implemented for `V0i8` note: required by a bound in `is_transmutable` --> $DIR/primitive_reprs_should_have_correct_length.rs:12:14 | @@ -21,13 +20,12 @@ LL | | } LL | | }> | |__________^ required by this bound in `is_transmutable` -error[E0277]: `V0i8` cannot be safely transmuted into `u16` in the defining scope of `n8::Context`. +error[E0277]: `V0i8` cannot be safely transmuted into `u16` in the defining scope of `n8::Context` --> $DIR/primitive_reprs_should_have_correct_length.rs:50:44 | LL | assert::is_transmutable::<Current, Larger, Context>(); - | ^^^^^^ `V0i8` cannot be safely transmuted into `u16` in the defining scope of `n8::Context`. + | ^^^^^^ The size of `V0i8` is smaller than the size of `u16` | - = help: the trait `BikeshedIntrinsicFrom<V0i8, n8::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: true }>` is not implemented for `u16` note: required by a bound in `is_transmutable` --> $DIR/primitive_reprs_should_have_correct_length.rs:12:14 | @@ -44,13 +42,12 @@ LL | | } LL | | }> | |__________^ required by this bound in `is_transmutable` -error[E0277]: `Zst` cannot be safely transmuted into `V0u8` in the defining scope of `n8::Context`. +error[E0277]: `Zst` cannot be safely transmuted into `V0u8` in the defining scope of `n8::Context` --> $DIR/primitive_reprs_should_have_correct_length.rs:56:44 | LL | assert::is_transmutable::<Smaller, Current, Context>(); - | ^^^^^^^ `Zst` cannot be safely transmuted into `V0u8` in the defining scope of `n8::Context`. + | ^^^^^^^ The size of `Zst` is smaller than the size of `V0u8` | - = help: the trait `BikeshedIntrinsicFrom<Zst, n8::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: true }>` is not implemented for `V0u8` note: required by a bound in `is_transmutable` --> $DIR/primitive_reprs_should_have_correct_length.rs:12:14 | @@ -67,13 +64,12 @@ LL | | } LL | | }> | |__________^ required by this bound in `is_transmutable` -error[E0277]: `V0u8` cannot be safely transmuted into `u16` in the defining scope of `n8::Context`. +error[E0277]: `V0u8` cannot be safely transmuted into `u16` in the defining scope of `n8::Context` --> $DIR/primitive_reprs_should_have_correct_length.rs:58:44 | LL | assert::is_transmutable::<Current, Larger, Context>(); - | ^^^^^^ `V0u8` cannot be safely transmuted into `u16` in the defining scope of `n8::Context`. + | ^^^^^^ The size of `V0u8` is smaller than the size of `u16` | - = help: the trait `BikeshedIntrinsicFrom<V0u8, n8::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: true }>` is not implemented for `u16` note: required by a bound in `is_transmutable` --> $DIR/primitive_reprs_should_have_correct_length.rs:12:14 | @@ -90,13 +86,12 @@ LL | | } LL | | }> | |__________^ required by this bound in `is_transmutable` -error[E0277]: `u8` cannot be safely transmuted into `V0i16` in the defining scope of `n16::Context`. +error[E0277]: `u8` cannot be safely transmuted into `V0i16` in the defining scope of `n16::Context` --> $DIR/primitive_reprs_should_have_correct_length.rs:72:44 | LL | assert::is_transmutable::<Smaller, Current, Context>(); - | ^^^^^^^ `u8` cannot be safely transmuted into `V0i16` in the defining scope of `n16::Context`. + | ^^^^^^^ At least one value of `u8` isn't a bit-valid value of `V0i16` | - = help: the trait `BikeshedIntrinsicFrom<u8, n16::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: true }>` is not implemented for `V0i16` note: required by a bound in `is_transmutable` --> $DIR/primitive_reprs_should_have_correct_length.rs:12:14 | @@ -113,13 +108,12 @@ LL | | } LL | | }> | |__________^ required by this bound in `is_transmutable` -error[E0277]: `V0i16` cannot be safely transmuted into `u32` in the defining scope of `n16::Context`. +error[E0277]: `V0i16` cannot be safely transmuted into `u32` in the defining scope of `n16::Context` --> $DIR/primitive_reprs_should_have_correct_length.rs:74:44 | LL | assert::is_transmutable::<Current, Larger, Context>(); - | ^^^^^^ `V0i16` cannot be safely transmuted into `u32` in the defining scope of `n16::Context`. + | ^^^^^^ The size of `V0i16` is smaller than the size of `u32` | - = help: the trait `BikeshedIntrinsicFrom<V0i16, n16::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: true }>` is not implemented for `u32` note: required by a bound in `is_transmutable` --> $DIR/primitive_reprs_should_have_correct_length.rs:12:14 | @@ -136,13 +130,12 @@ LL | | } LL | | }> | |__________^ required by this bound in `is_transmutable` -error[E0277]: `u8` cannot be safely transmuted into `V0u16` in the defining scope of `n16::Context`. +error[E0277]: `u8` cannot be safely transmuted into `V0u16` in the defining scope of `n16::Context` --> $DIR/primitive_reprs_should_have_correct_length.rs:80:44 | LL | assert::is_transmutable::<Smaller, Current, Context>(); - | ^^^^^^^ `u8` cannot be safely transmuted into `V0u16` in the defining scope of `n16::Context`. + | ^^^^^^^ At least one value of `u8` isn't a bit-valid value of `V0u16` | - = help: the trait `BikeshedIntrinsicFrom<u8, n16::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: true }>` is not implemented for `V0u16` note: required by a bound in `is_transmutable` --> $DIR/primitive_reprs_should_have_correct_length.rs:12:14 | @@ -159,13 +152,12 @@ LL | | } LL | | }> | |__________^ required by this bound in `is_transmutable` -error[E0277]: `V0u16` cannot be safely transmuted into `u32` in the defining scope of `n16::Context`. +error[E0277]: `V0u16` cannot be safely transmuted into `u32` in the defining scope of `n16::Context` --> $DIR/primitive_reprs_should_have_correct_length.rs:82:44 | LL | assert::is_transmutable::<Current, Larger, Context>(); - | ^^^^^^ `V0u16` cannot be safely transmuted into `u32` in the defining scope of `n16::Context`. + | ^^^^^^ The size of `V0u16` is smaller than the size of `u32` | - = help: the trait `BikeshedIntrinsicFrom<V0u16, n16::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: true }>` is not implemented for `u32` note: required by a bound in `is_transmutable` --> $DIR/primitive_reprs_should_have_correct_length.rs:12:14 | @@ -182,13 +174,12 @@ LL | | } LL | | }> | |__________^ required by this bound in `is_transmutable` -error[E0277]: `u16` cannot be safely transmuted into `V0i32` in the defining scope of `n32::Context`. +error[E0277]: `u16` cannot be safely transmuted into `V0i32` in the defining scope of `n32::Context` --> $DIR/primitive_reprs_should_have_correct_length.rs:96:44 | LL | assert::is_transmutable::<Smaller, Current, Context>(); - | ^^^^^^^ `u16` cannot be safely transmuted into `V0i32` in the defining scope of `n32::Context`. + | ^^^^^^^ At least one value of `u16` isn't a bit-valid value of `V0i32` | - = help: the trait `BikeshedIntrinsicFrom<u16, n32::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: true }>` is not implemented for `V0i32` note: required by a bound in `is_transmutable` --> $DIR/primitive_reprs_should_have_correct_length.rs:12:14 | @@ -205,13 +196,12 @@ LL | | } LL | | }> | |__________^ required by this bound in `is_transmutable` -error[E0277]: `V0i32` cannot be safely transmuted into `u64` in the defining scope of `n32::Context`. +error[E0277]: `V0i32` cannot be safely transmuted into `u64` in the defining scope of `n32::Context` --> $DIR/primitive_reprs_should_have_correct_length.rs:98:44 | LL | assert::is_transmutable::<Current, Larger, Context>(); - | ^^^^^^ `V0i32` cannot be safely transmuted into `u64` in the defining scope of `n32::Context`. + | ^^^^^^ The size of `V0i32` is smaller than the size of `u64` | - = help: the trait `BikeshedIntrinsicFrom<V0i32, n32::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: true }>` is not implemented for `u64` note: required by a bound in `is_transmutable` --> $DIR/primitive_reprs_should_have_correct_length.rs:12:14 | @@ -228,13 +218,12 @@ LL | | } LL | | }> | |__________^ required by this bound in `is_transmutable` -error[E0277]: `u16` cannot be safely transmuted into `V0u32` in the defining scope of `n32::Context`. +error[E0277]: `u16` cannot be safely transmuted into `V0u32` in the defining scope of `n32::Context` --> $DIR/primitive_reprs_should_have_correct_length.rs:104:44 | LL | assert::is_transmutable::<Smaller, Current, Context>(); - | ^^^^^^^ `u16` cannot be safely transmuted into `V0u32` in the defining scope of `n32::Context`. + | ^^^^^^^ At least one value of `u16` isn't a bit-valid value of `V0u32` | - = help: the trait `BikeshedIntrinsicFrom<u16, n32::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: true }>` is not implemented for `V0u32` note: required by a bound in `is_transmutable` --> $DIR/primitive_reprs_should_have_correct_length.rs:12:14 | @@ -251,13 +240,12 @@ LL | | } LL | | }> | |__________^ required by this bound in `is_transmutable` -error[E0277]: `V0u32` cannot be safely transmuted into `u64` in the defining scope of `n32::Context`. +error[E0277]: `V0u32` cannot be safely transmuted into `u64` in the defining scope of `n32::Context` --> $DIR/primitive_reprs_should_have_correct_length.rs:106:44 | LL | assert::is_transmutable::<Current, Larger, Context>(); - | ^^^^^^ `V0u32` cannot be safely transmuted into `u64` in the defining scope of `n32::Context`. + | ^^^^^^ The size of `V0u32` is smaller than the size of `u64` | - = help: the trait `BikeshedIntrinsicFrom<V0u32, n32::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: true }>` is not implemented for `u64` note: required by a bound in `is_transmutable` --> $DIR/primitive_reprs_should_have_correct_length.rs:12:14 | @@ -274,13 +262,12 @@ LL | | } LL | | }> | |__________^ required by this bound in `is_transmutable` -error[E0277]: `u32` cannot be safely transmuted into `V0i64` in the defining scope of `n64::Context`. +error[E0277]: `u32` cannot be safely transmuted into `V0i64` in the defining scope of `n64::Context` --> $DIR/primitive_reprs_should_have_correct_length.rs:120:44 | LL | assert::is_transmutable::<Smaller, Current, Context>(); - | ^^^^^^^ `u32` cannot be safely transmuted into `V0i64` in the defining scope of `n64::Context`. + | ^^^^^^^ At least one value of `u32` isn't a bit-valid value of `V0i64` | - = help: the trait `BikeshedIntrinsicFrom<u32, n64::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: true }>` is not implemented for `V0i64` note: required by a bound in `is_transmutable` --> $DIR/primitive_reprs_should_have_correct_length.rs:12:14 | @@ -297,13 +284,12 @@ LL | | } LL | | }> | |__________^ required by this bound in `is_transmutable` -error[E0277]: `V0i64` cannot be safely transmuted into `u128` in the defining scope of `n64::Context`. +error[E0277]: `V0i64` cannot be safely transmuted into `u128` in the defining scope of `n64::Context` --> $DIR/primitive_reprs_should_have_correct_length.rs:122:44 | LL | assert::is_transmutable::<Current, Larger, Context>(); - | ^^^^^^ `V0i64` cannot be safely transmuted into `u128` in the defining scope of `n64::Context`. + | ^^^^^^ The size of `V0i64` is smaller than the size of `u128` | - = help: the trait `BikeshedIntrinsicFrom<V0i64, n64::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: true }>` is not implemented for `u128` note: required by a bound in `is_transmutable` --> $DIR/primitive_reprs_should_have_correct_length.rs:12:14 | @@ -320,13 +306,12 @@ LL | | } LL | | }> | |__________^ required by this bound in `is_transmutable` -error[E0277]: `u32` cannot be safely transmuted into `V0u64` in the defining scope of `n64::Context`. +error[E0277]: `u32` cannot be safely transmuted into `V0u64` in the defining scope of `n64::Context` --> $DIR/primitive_reprs_should_have_correct_length.rs:128:44 | LL | assert::is_transmutable::<Smaller, Current, Context>(); - | ^^^^^^^ `u32` cannot be safely transmuted into `V0u64` in the defining scope of `n64::Context`. + | ^^^^^^^ At least one value of `u32` isn't a bit-valid value of `V0u64` | - = help: the trait `BikeshedIntrinsicFrom<u32, n64::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: true }>` is not implemented for `V0u64` note: required by a bound in `is_transmutable` --> $DIR/primitive_reprs_should_have_correct_length.rs:12:14 | @@ -343,13 +328,12 @@ LL | | } LL | | }> | |__________^ required by this bound in `is_transmutable` -error[E0277]: `V0u64` cannot be safely transmuted into `u128` in the defining scope of `n64::Context`. +error[E0277]: `V0u64` cannot be safely transmuted into `u128` in the defining scope of `n64::Context` --> $DIR/primitive_reprs_should_have_correct_length.rs:130:44 | LL | assert::is_transmutable::<Current, Larger, Context>(); - | ^^^^^^ `V0u64` cannot be safely transmuted into `u128` in the defining scope of `n64::Context`. + | ^^^^^^ The size of `V0u64` is smaller than the size of `u128` | - = help: the trait `BikeshedIntrinsicFrom<V0u64, n64::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: true }>` is not implemented for `u128` note: required by a bound in `is_transmutable` --> $DIR/primitive_reprs_should_have_correct_length.rs:12:14 | @@ -366,13 +350,12 @@ LL | | } LL | | }> | |__________^ required by this bound in `is_transmutable` -error[E0277]: `u8` cannot be safely transmuted into `V0isize` in the defining scope of `nsize::Context`. +error[E0277]: `u8` cannot be safely transmuted into `V0isize` in the defining scope of `nsize::Context` --> $DIR/primitive_reprs_should_have_correct_length.rs:144:44 | LL | assert::is_transmutable::<Smaller, Current, Context>(); - | ^^^^^^^ `u8` cannot be safely transmuted into `V0isize` in the defining scope of `nsize::Context`. + | ^^^^^^^ At least one value of `u8` isn't a bit-valid value of `V0isize` | - = help: the trait `BikeshedIntrinsicFrom<u8, nsize::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: true }>` is not implemented for `V0isize` note: required by a bound in `is_transmutable` --> $DIR/primitive_reprs_should_have_correct_length.rs:12:14 | @@ -389,13 +372,12 @@ LL | | } LL | | }> | |__________^ required by this bound in `is_transmutable` -error[E0277]: `V0isize` cannot be safely transmuted into `[usize; 2]` in the defining scope of `nsize::Context`. +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:146:44 | LL | assert::is_transmutable::<Current, Larger, Context>(); - | ^^^^^^ `V0isize` cannot be safely transmuted into `[usize; 2]` in the defining scope of `nsize::Context`. + | ^^^^^^ The size of `V0isize` is smaller than the size of `[usize; 2]` | - = help: the trait `BikeshedIntrinsicFrom<V0isize, nsize::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: 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 | @@ -412,13 +394,12 @@ LL | | } LL | | }> | |__________^ required by this bound in `is_transmutable` -error[E0277]: `u8` cannot be safely transmuted into `V0usize` in the defining scope of `nsize::Context`. +error[E0277]: `u8` cannot be safely transmuted into `V0usize` in the defining scope of `nsize::Context` --> $DIR/primitive_reprs_should_have_correct_length.rs:152:44 | LL | assert::is_transmutable::<Smaller, Current, Context>(); - | ^^^^^^^ `u8` cannot be safely transmuted into `V0usize` in the defining scope of `nsize::Context`. + | ^^^^^^^ At least one value of `u8` isn't a bit-valid value of `V0usize` | - = help: the trait `BikeshedIntrinsicFrom<u8, nsize::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: true }>` is not implemented for `V0usize` note: required by a bound in `is_transmutable` --> $DIR/primitive_reprs_should_have_correct_length.rs:12:14 | @@ -435,13 +416,12 @@ LL | | } LL | | }> | |__________^ required by this bound in `is_transmutable` -error[E0277]: `V0usize` cannot be safely transmuted into `[usize; 2]` in the defining scope of `nsize::Context`. +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:154:44 | LL | assert::is_transmutable::<Current, Larger, Context>(); - | ^^^^^^ `V0usize` cannot be safely transmuted into `[usize; 2]` in the defining scope of `nsize::Context`. + | ^^^^^^ The size of `V0usize` is smaller than the size of `[usize; 2]` | - = help: the trait `BikeshedIntrinsicFrom<V0usize, nsize::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: 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/tests/ui/transmutability/enums/repr/should_require_well_defined_layout.stderr b/tests/ui/transmutability/enums/repr/should_require_well_defined_layout.stderr index d456a746f..1612b6b36 100644 --- a/tests/ui/transmutability/enums/repr/should_require_well_defined_layout.stderr +++ b/tests/ui/transmutability/enums/repr/should_require_well_defined_layout.stderr @@ -1,10 +1,9 @@ -error[E0277]: `void::repr_rust` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. +error[E0277]: `void::repr_rust` cannot be safely transmuted into `()` in the defining scope of `assert::Context` --> $DIR/should_require_well_defined_layout.rs:28:52 | LL | assert::is_maybe_transmutable::<repr_rust, ()>(); - | ^^ `void::repr_rust` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. + | ^^ `void::repr_rust` does not have a well-specified layout | - = help: the trait `BikeshedIntrinsicFrom<void::repr_rust, assert::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: true }>` is not implemented for `()` note: required by a bound in `is_maybe_transmutable` --> $DIR/should_require_well_defined_layout.rs:14:14 | @@ -21,13 +20,12 @@ LL | | } LL | | }> | |__________^ required by this bound in `is_maybe_transmutable` -error[E0277]: `u128` cannot be safely transmuted into `void::repr_rust` in the defining scope of `assert::Context`. +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:29:47 | LL | assert::is_maybe_transmutable::<u128, repr_rust>(); - | ^^^^^^^^^ `u128` cannot be safely transmuted into `void::repr_rust` in the defining scope of `assert::Context`. + | ^^^^^^^^^ `void::repr_rust` does not have a well-specified layout | - = help: the trait `BikeshedIntrinsicFrom<u128, assert::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: 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 | @@ -44,13 +42,12 @@ LL | | } LL | | }> | |__________^ required by this bound in `is_maybe_transmutable` -error[E0277]: `singleton::repr_rust` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. +error[E0277]: `singleton::repr_rust` cannot be safely transmuted into `()` in the defining scope of `assert::Context` --> $DIR/should_require_well_defined_layout.rs:34:52 | LL | assert::is_maybe_transmutable::<repr_rust, ()>(); - | ^^ `singleton::repr_rust` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. + | ^^ `singleton::repr_rust` does not have a well-specified layout | - = help: the trait `BikeshedIntrinsicFrom<singleton::repr_rust, assert::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: true }>` is not implemented for `()` note: required by a bound in `is_maybe_transmutable` --> $DIR/should_require_well_defined_layout.rs:14:14 | @@ -67,13 +64,12 @@ LL | | } LL | | }> | |__________^ required by this bound in `is_maybe_transmutable` -error[E0277]: `u128` cannot be safely transmuted into `singleton::repr_rust` in the defining scope of `assert::Context`. +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:35:47 | LL | assert::is_maybe_transmutable::<u128, repr_rust>(); - | ^^^^^^^^^ `u128` cannot be safely transmuted into `singleton::repr_rust` in the defining scope of `assert::Context`. + | ^^^^^^^^^ `singleton::repr_rust` does not have a well-specified layout | - = help: the trait `BikeshedIntrinsicFrom<u128, assert::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: 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 | @@ -90,13 +86,12 @@ LL | | } LL | | }> | |__________^ required by this bound in `is_maybe_transmutable` -error[E0277]: `duplex::repr_rust` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. +error[E0277]: `duplex::repr_rust` cannot be safely transmuted into `()` in the defining scope of `assert::Context` --> $DIR/should_require_well_defined_layout.rs:40:52 | LL | assert::is_maybe_transmutable::<repr_rust, ()>(); - | ^^ `duplex::repr_rust` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. + | ^^ `duplex::repr_rust` does not have a well-specified layout | - = help: the trait `BikeshedIntrinsicFrom<duplex::repr_rust, assert::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: true }>` is not implemented for `()` note: required by a bound in `is_maybe_transmutable` --> $DIR/should_require_well_defined_layout.rs:14:14 | @@ -113,13 +108,12 @@ LL | | } LL | | }> | |__________^ required by this bound in `is_maybe_transmutable` -error[E0277]: `u128` cannot be safely transmuted into `duplex::repr_rust` in the defining scope of `assert::Context`. +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:41:47 | LL | assert::is_maybe_transmutable::<u128, repr_rust>(); - | ^^^^^^^^^ `u128` cannot be safely transmuted into `duplex::repr_rust` in the defining scope of `assert::Context`. + | ^^^^^^^^^ `duplex::repr_rust` does not have a well-specified layout | - = help: the trait `BikeshedIntrinsicFrom<u128, assert::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: 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/tests/ui/transmutability/enums/should_pad_variants.stderr b/tests/ui/transmutability/enums/should_pad_variants.stderr index f4988239d..bfbef8b25 100644 --- a/tests/ui/transmutability/enums/should_pad_variants.stderr +++ b/tests/ui/transmutability/enums/should_pad_variants.stderr @@ -1,10 +1,9 @@ -error[E0277]: `Src` cannot be safely transmuted into `Dst` in the defining scope of `should_pad_variants::Context`. +error[E0277]: `Src` cannot be safely transmuted into `Dst` in the defining scope of `should_pad_variants::Context` --> $DIR/should_pad_variants.rs:44:36 | LL | assert::is_transmutable::<Src, Dst, Context>(); - | ^^^ `Src` cannot be safely transmuted into `Dst` in the defining scope of `should_pad_variants::Context`. + | ^^^ The size of `Src` is smaller than the size of `Dst` | - = help: the trait `BikeshedIntrinsicFrom<Src, should_pad_variants::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: true }>` is not implemented for `Dst` note: required by a bound in `is_transmutable` --> $DIR/should_pad_variants.rs:13:14 | diff --git a/tests/ui/transmutability/enums/should_respect_endianness.stderr b/tests/ui/transmutability/enums/should_respect_endianness.stderr index 350583b0b..e59301a8c 100644 --- a/tests/ui/transmutability/enums/should_respect_endianness.stderr +++ b/tests/ui/transmutability/enums/should_respect_endianness.stderr @@ -1,10 +1,9 @@ -error[E0277]: `Src` cannot be safely transmuted into `Unexpected` in the defining scope of `assert::Context`. +error[E0277]: `Src` cannot be safely transmuted into `Unexpected` in the defining scope of `assert::Context` --> $DIR/should_respect_endianness.rs:36:36 | LL | assert::is_transmutable::<Src, Unexpected>(); - | ^^^^^^^^^^ `Src` cannot be safely transmuted into `Unexpected` in the defining scope of `assert::Context`. + | ^^^^^^^^^^ At least one value of `Src` isn't a bit-valid value of `Unexpected` | - = help: the trait `BikeshedIntrinsicFrom<Src, assert::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: true }>` is not implemented for `Unexpected` note: required by a bound in `is_transmutable` --> $DIR/should_respect_endianness.rs:14:14 | diff --git a/tests/ui/transmutability/issue-101739-1.rs b/tests/ui/transmutability/issue-101739-1.rs index bcb8b158e..2b9666091 100644 --- a/tests/ui/transmutability/issue-101739-1.rs +++ b/tests/ui/transmutability/issue-101739-1.rs @@ -6,7 +6,7 @@ mod assert { pub fn is_transmutable<Src, Context, const ASSUME_ALIGNMENT: bool>() where Dst: BikeshedIntrinsicFrom<Src, Context, ASSUME_ALIGNMENT>, //~ ERROR cannot find type `Dst` in this scope - //~^ ERROR mismatched types + //~^ the constant `ASSUME_ALIGNMENT` is not of type `Assume` { } } diff --git a/tests/ui/transmutability/issue-101739-1.stderr b/tests/ui/transmutability/issue-101739-1.stderr index 7c6b533ef..bf947d0ea 100644 --- a/tests/ui/transmutability/issue-101739-1.stderr +++ b/tests/ui/transmutability/issue-101739-1.stderr @@ -4,13 +4,15 @@ error[E0412]: cannot find type `Dst` in this scope LL | Dst: BikeshedIntrinsicFrom<Src, Context, ASSUME_ALIGNMENT>, | ^^^ not found in this scope -error[E0308]: mismatched types - --> $DIR/issue-101739-1.rs:8:50 +error: the constant `ASSUME_ALIGNMENT` is not of type `Assume` + --> $DIR/issue-101739-1.rs:8:14 | LL | Dst: BikeshedIntrinsicFrom<Src, Context, ASSUME_ALIGNMENT>, - | ^^^^^^^^^^^^^^^^ expected `Assume`, found `bool` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Assume`, found `bool` + | +note: required by a bound in `BikeshedIntrinsicFrom` + --> $SRC_DIR/core/src/mem/transmutability.rs:LL:COL error: aborting due to 2 previous errors -Some errors have detailed explanations: E0308, E0412. -For more information about an error, try `rustc --explain E0308`. +For more information about this error, try `rustc --explain E0412`. diff --git a/tests/ui/transmutability/primitives/bool.stderr b/tests/ui/transmutability/primitives/bool.current.stderr index 22decf15e..47c8438a2 100644 --- a/tests/ui/transmutability/primitives/bool.stderr +++ b/tests/ui/transmutability/primitives/bool.current.stderr @@ -1,12 +1,11 @@ -error[E0277]: `u8` cannot be safely transmuted into `bool` in the defining scope of `assert::Context`. - --> $DIR/bool.rs:22:35 +error[E0277]: `u8` cannot be safely transmuted into `bool` in the defining scope of `assert::Context` + --> $DIR/bool.rs:24:35 | LL | assert::is_transmutable::<u8, bool>(); - | ^^^^ `u8` cannot be safely transmuted into `bool` in the defining scope of `assert::Context`. + | ^^^^ At least one value of `u8` isn't a bit-valid value of `bool` | - = help: the trait `BikeshedIntrinsicFrom<u8, assert::Context, Assume { alignment: false, lifetimes: false, safety: true, validity: false }>` is not implemented for `bool` note: required by a bound in `is_transmutable` - --> $DIR/bool.rs:12:14 + --> $DIR/bool.rs:14:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function diff --git a/tests/ui/transmutability/primitives/bool.next.stderr b/tests/ui/transmutability/primitives/bool.next.stderr new file mode 100644 index 000000000..47c8438a2 --- /dev/null +++ b/tests/ui/transmutability/primitives/bool.next.stderr @@ -0,0 +1,18 @@ +error[E0277]: `u8` cannot be safely transmuted into `bool` in the defining scope of `assert::Context` + --> $DIR/bool.rs:24:35 + | +LL | assert::is_transmutable::<u8, bool>(); + | ^^^^ At least one value of `u8` isn't a bit-valid value of `bool` + | +note: required by a bound in `is_transmutable` + --> $DIR/bool.rs:14:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context, { Assume::SAFETY }> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/transmutability/primitives/bool.rs b/tests/ui/transmutability/primitives/bool.rs index eebb74fff..de77cfc78 100644 --- a/tests/ui/transmutability/primitives/bool.rs +++ b/tests/ui/transmutability/primitives/bool.rs @@ -1,8 +1,10 @@ +// revisions: current next +//[next] compile-flags: -Ztrait-solver=next + #![crate_type = "lib"] #![feature(transmutability)] #![allow(dead_code)] #![allow(incomplete_features)] - mod assert { use std::mem::{Assume, BikeshedIntrinsicFrom}; pub struct Context; diff --git a/tests/ui/transmutability/primitives/numbers.stderr b/tests/ui/transmutability/primitives/numbers.current.stderr index c04a0e82a..d12e17297 100644 --- a/tests/ui/transmutability/primitives/numbers.stderr +++ b/tests/ui/transmutability/primitives/numbers.current.stderr @@ -1,12 +1,11 @@ -error[E0277]: `i8` cannot be safely transmuted into `i16` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:62:40 +error[E0277]: `i8` cannot be safely transmuted into `i16` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:65:40 | LL | assert::is_transmutable::< i8, i16>(); - | ^^^ `i8` cannot be safely transmuted into `i16` in the defining scope of `assert::Context`. + | ^^^ The size of `i8` is smaller than the size of `i16` | - = help: the trait `BikeshedIntrinsicFrom<i8, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `i16` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -14,15 +13,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `i8` cannot be safely transmuted into `u16` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:63:40 +error[E0277]: `i8` cannot be safely transmuted into `u16` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:66:40 | LL | assert::is_transmutable::< i8, u16>(); - | ^^^ `i8` cannot be safely transmuted into `u16` in the defining scope of `assert::Context`. + | ^^^ The size of `i8` is smaller than the size of `u16` | - = help: the trait `BikeshedIntrinsicFrom<i8, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `u16` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -30,15 +28,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `i8` cannot be safely transmuted into `i32` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:64:40 +error[E0277]: `i8` cannot be safely transmuted into `i32` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:67:40 | LL | assert::is_transmutable::< i8, i32>(); - | ^^^ `i8` cannot be safely transmuted into `i32` in the defining scope of `assert::Context`. + | ^^^ The size of `i8` is smaller than the size of `i32` | - = help: the trait `BikeshedIntrinsicFrom<i8, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `i32` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -46,15 +43,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `i8` cannot be safely transmuted into `f32` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:65:40 +error[E0277]: `i8` cannot be safely transmuted into `f32` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:68:40 | LL | assert::is_transmutable::< i8, f32>(); - | ^^^ `i8` cannot be safely transmuted into `f32` in the defining scope of `assert::Context`. + | ^^^ The size of `i8` is smaller than the size of `f32` | - = help: the trait `BikeshedIntrinsicFrom<i8, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `f32` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -62,15 +58,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `i8` cannot be safely transmuted into `u32` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:66:40 +error[E0277]: `i8` cannot be safely transmuted into `u32` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:69:40 | LL | assert::is_transmutable::< i8, u32>(); - | ^^^ `i8` cannot be safely transmuted into `u32` in the defining scope of `assert::Context`. + | ^^^ The size of `i8` is smaller than the size of `u32` | - = help: the trait `BikeshedIntrinsicFrom<i8, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `u32` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -78,15 +73,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `i8` cannot be safely transmuted into `u64` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:67:40 +error[E0277]: `i8` cannot be safely transmuted into `u64` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:70:40 | LL | assert::is_transmutable::< i8, u64>(); - | ^^^ `i8` cannot be safely transmuted into `u64` in the defining scope of `assert::Context`. + | ^^^ The size of `i8` is smaller than the size of `u64` | - = help: the trait `BikeshedIntrinsicFrom<i8, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `u64` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -94,15 +88,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `i8` cannot be safely transmuted into `i64` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:68:40 +error[E0277]: `i8` cannot be safely transmuted into `i64` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:71:40 | LL | assert::is_transmutable::< i8, i64>(); - | ^^^ `i8` cannot be safely transmuted into `i64` in the defining scope of `assert::Context`. + | ^^^ The size of `i8` is smaller than the size of `i64` | - = help: the trait `BikeshedIntrinsicFrom<i8, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `i64` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -110,15 +103,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `i8` cannot be safely transmuted into `f64` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:69:40 +error[E0277]: `i8` cannot be safely transmuted into `f64` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:72:40 | LL | assert::is_transmutable::< i8, f64>(); - | ^^^ `i8` cannot be safely transmuted into `f64` in the defining scope of `assert::Context`. + | ^^^ The size of `i8` is smaller than the size of `f64` | - = help: the trait `BikeshedIntrinsicFrom<i8, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `f64` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -126,15 +118,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `i8` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:70:39 +error[E0277]: `i8` cannot be safely transmuted into `u128` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:73:39 | LL | assert::is_transmutable::< i8, u128>(); - | ^^^^ `i8` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. + | ^^^^ The size of `i8` is smaller than the size of `u128` | - = help: the trait `BikeshedIntrinsicFrom<i8, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `u128` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -142,15 +133,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `i8` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:71:39 +error[E0277]: `i8` cannot be safely transmuted into `i128` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:74:39 | LL | assert::is_transmutable::< i8, i128>(); - | ^^^^ `i8` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. + | ^^^^ The size of `i8` is smaller than the size of `i128` | - = help: the trait `BikeshedIntrinsicFrom<i8, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `i128` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -158,15 +148,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `u8` cannot be safely transmuted into `i16` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:73:40 +error[E0277]: `u8` cannot be safely transmuted into `i16` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:76:40 | LL | assert::is_transmutable::< u8, i16>(); - | ^^^ `u8` cannot be safely transmuted into `i16` in the defining scope of `assert::Context`. + | ^^^ The size of `u8` is smaller than the size of `i16` | - = help: the trait `BikeshedIntrinsicFrom<u8, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `i16` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -174,15 +163,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `u8` cannot be safely transmuted into `u16` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:74:40 +error[E0277]: `u8` cannot be safely transmuted into `u16` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:77:40 | LL | assert::is_transmutable::< u8, u16>(); - | ^^^ `u8` cannot be safely transmuted into `u16` in the defining scope of `assert::Context`. + | ^^^ The size of `u8` is smaller than the size of `u16` | - = help: the trait `BikeshedIntrinsicFrom<u8, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `u16` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -190,15 +178,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `u8` cannot be safely transmuted into `i32` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:75:40 +error[E0277]: `u8` cannot be safely transmuted into `i32` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:78:40 | LL | assert::is_transmutable::< u8, i32>(); - | ^^^ `u8` cannot be safely transmuted into `i32` in the defining scope of `assert::Context`. + | ^^^ The size of `u8` is smaller than the size of `i32` | - = help: the trait `BikeshedIntrinsicFrom<u8, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `i32` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -206,15 +193,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `u8` cannot be safely transmuted into `f32` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:76:40 +error[E0277]: `u8` cannot be safely transmuted into `f32` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:79:40 | LL | assert::is_transmutable::< u8, f32>(); - | ^^^ `u8` cannot be safely transmuted into `f32` in the defining scope of `assert::Context`. + | ^^^ The size of `u8` is smaller than the size of `f32` | - = help: the trait `BikeshedIntrinsicFrom<u8, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `f32` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -222,15 +208,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `u8` cannot be safely transmuted into `u32` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:77:40 +error[E0277]: `u8` cannot be safely transmuted into `u32` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:80:40 | LL | assert::is_transmutable::< u8, u32>(); - | ^^^ `u8` cannot be safely transmuted into `u32` in the defining scope of `assert::Context`. + | ^^^ The size of `u8` is smaller than the size of `u32` | - = help: the trait `BikeshedIntrinsicFrom<u8, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `u32` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -238,15 +223,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `u8` cannot be safely transmuted into `u64` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:78:40 +error[E0277]: `u8` cannot be safely transmuted into `u64` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:81:40 | LL | assert::is_transmutable::< u8, u64>(); - | ^^^ `u8` cannot be safely transmuted into `u64` in the defining scope of `assert::Context`. + | ^^^ The size of `u8` is smaller than the size of `u64` | - = help: the trait `BikeshedIntrinsicFrom<u8, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `u64` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -254,15 +238,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `u8` cannot be safely transmuted into `i64` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:79:40 +error[E0277]: `u8` cannot be safely transmuted into `i64` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:82:40 | LL | assert::is_transmutable::< u8, i64>(); - | ^^^ `u8` cannot be safely transmuted into `i64` in the defining scope of `assert::Context`. + | ^^^ The size of `u8` is smaller than the size of `i64` | - = help: the trait `BikeshedIntrinsicFrom<u8, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `i64` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -270,15 +253,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `u8` cannot be safely transmuted into `f64` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:80:40 +error[E0277]: `u8` cannot be safely transmuted into `f64` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:83:40 | LL | assert::is_transmutable::< u8, f64>(); - | ^^^ `u8` cannot be safely transmuted into `f64` in the defining scope of `assert::Context`. + | ^^^ The size of `u8` is smaller than the size of `f64` | - = help: the trait `BikeshedIntrinsicFrom<u8, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `f64` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -286,15 +268,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `u8` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:81:39 +error[E0277]: `u8` cannot be safely transmuted into `u128` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:84:39 | LL | assert::is_transmutable::< u8, u128>(); - | ^^^^ `u8` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. + | ^^^^ The size of `u8` is smaller than the size of `u128` | - = help: the trait `BikeshedIntrinsicFrom<u8, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `u128` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -302,15 +283,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `u8` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:82:39 +error[E0277]: `u8` cannot be safely transmuted into `i128` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:85:39 | LL | assert::is_transmutable::< u8, i128>(); - | ^^^^ `u8` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. + | ^^^^ The size of `u8` is smaller than the size of `i128` | - = help: the trait `BikeshedIntrinsicFrom<u8, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `i128` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -318,15 +298,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `i16` cannot be safely transmuted into `i32` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:84:40 +error[E0277]: `i16` cannot be safely transmuted into `i32` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:87:40 | LL | assert::is_transmutable::< i16, i32>(); - | ^^^ `i16` cannot be safely transmuted into `i32` in the defining scope of `assert::Context`. + | ^^^ The size of `i16` is smaller than the size of `i32` | - = help: the trait `BikeshedIntrinsicFrom<i16, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `i32` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -334,15 +313,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `i16` cannot be safely transmuted into `f32` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:85:40 +error[E0277]: `i16` cannot be safely transmuted into `f32` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:88:40 | LL | assert::is_transmutable::< i16, f32>(); - | ^^^ `i16` cannot be safely transmuted into `f32` in the defining scope of `assert::Context`. + | ^^^ The size of `i16` is smaller than the size of `f32` | - = help: the trait `BikeshedIntrinsicFrom<i16, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `f32` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -350,15 +328,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `i16` cannot be safely transmuted into `u32` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:86:40 +error[E0277]: `i16` cannot be safely transmuted into `u32` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:89:40 | LL | assert::is_transmutable::< i16, u32>(); - | ^^^ `i16` cannot be safely transmuted into `u32` in the defining scope of `assert::Context`. + | ^^^ The size of `i16` is smaller than the size of `u32` | - = help: the trait `BikeshedIntrinsicFrom<i16, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `u32` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -366,15 +343,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `i16` cannot be safely transmuted into `u64` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:87:40 +error[E0277]: `i16` cannot be safely transmuted into `u64` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:90:40 | LL | assert::is_transmutable::< i16, u64>(); - | ^^^ `i16` cannot be safely transmuted into `u64` in the defining scope of `assert::Context`. + | ^^^ The size of `i16` is smaller than the size of `u64` | - = help: the trait `BikeshedIntrinsicFrom<i16, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `u64` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -382,15 +358,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `i16` cannot be safely transmuted into `i64` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:88:40 +error[E0277]: `i16` cannot be safely transmuted into `i64` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:91:40 | LL | assert::is_transmutable::< i16, i64>(); - | ^^^ `i16` cannot be safely transmuted into `i64` in the defining scope of `assert::Context`. + | ^^^ The size of `i16` is smaller than the size of `i64` | - = help: the trait `BikeshedIntrinsicFrom<i16, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `i64` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -398,15 +373,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `i16` cannot be safely transmuted into `f64` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:89:40 +error[E0277]: `i16` cannot be safely transmuted into `f64` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:92:40 | LL | assert::is_transmutable::< i16, f64>(); - | ^^^ `i16` cannot be safely transmuted into `f64` in the defining scope of `assert::Context`. + | ^^^ The size of `i16` is smaller than the size of `f64` | - = help: the trait `BikeshedIntrinsicFrom<i16, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `f64` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -414,15 +388,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `i16` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:90:39 +error[E0277]: `i16` cannot be safely transmuted into `u128` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:93:39 | LL | assert::is_transmutable::< i16, u128>(); - | ^^^^ `i16` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. + | ^^^^ The size of `i16` is smaller than the size of `u128` | - = help: the trait `BikeshedIntrinsicFrom<i16, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `u128` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -430,15 +403,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `i16` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:91:39 +error[E0277]: `i16` cannot be safely transmuted into `i128` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:94:39 | LL | assert::is_transmutable::< i16, i128>(); - | ^^^^ `i16` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. + | ^^^^ The size of `i16` is smaller than the size of `i128` | - = help: the trait `BikeshedIntrinsicFrom<i16, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `i128` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -446,15 +418,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `u16` cannot be safely transmuted into `i32` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:93:40 +error[E0277]: `u16` cannot be safely transmuted into `i32` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:96:40 | LL | assert::is_transmutable::< u16, i32>(); - | ^^^ `u16` cannot be safely transmuted into `i32` in the defining scope of `assert::Context`. + | ^^^ The size of `u16` is smaller than the size of `i32` | - = help: the trait `BikeshedIntrinsicFrom<u16, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `i32` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -462,15 +433,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `u16` cannot be safely transmuted into `f32` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:94:40 +error[E0277]: `u16` cannot be safely transmuted into `f32` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:97:40 | LL | assert::is_transmutable::< u16, f32>(); - | ^^^ `u16` cannot be safely transmuted into `f32` in the defining scope of `assert::Context`. + | ^^^ The size of `u16` is smaller than the size of `f32` | - = help: the trait `BikeshedIntrinsicFrom<u16, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `f32` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -478,15 +448,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `u16` cannot be safely transmuted into `u32` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:95:40 +error[E0277]: `u16` cannot be safely transmuted into `u32` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:98:40 | LL | assert::is_transmutable::< u16, u32>(); - | ^^^ `u16` cannot be safely transmuted into `u32` in the defining scope of `assert::Context`. + | ^^^ The size of `u16` is smaller than the size of `u32` | - = help: the trait `BikeshedIntrinsicFrom<u16, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `u32` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -494,15 +463,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `u16` cannot be safely transmuted into `u64` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:96:40 +error[E0277]: `u16` cannot be safely transmuted into `u64` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:99:40 | LL | assert::is_transmutable::< u16, u64>(); - | ^^^ `u16` cannot be safely transmuted into `u64` in the defining scope of `assert::Context`. + | ^^^ The size of `u16` is smaller than the size of `u64` | - = help: the trait `BikeshedIntrinsicFrom<u16, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `u64` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -510,15 +478,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `u16` cannot be safely transmuted into `i64` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:97:40 +error[E0277]: `u16` cannot be safely transmuted into `i64` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:100:40 | LL | assert::is_transmutable::< u16, i64>(); - | ^^^ `u16` cannot be safely transmuted into `i64` in the defining scope of `assert::Context`. + | ^^^ The size of `u16` is smaller than the size of `i64` | - = help: the trait `BikeshedIntrinsicFrom<u16, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `i64` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -526,15 +493,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `u16` cannot be safely transmuted into `f64` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:98:40 +error[E0277]: `u16` cannot be safely transmuted into `f64` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:101:40 | LL | assert::is_transmutable::< u16, f64>(); - | ^^^ `u16` cannot be safely transmuted into `f64` in the defining scope of `assert::Context`. + | ^^^ The size of `u16` is smaller than the size of `f64` | - = help: the trait `BikeshedIntrinsicFrom<u16, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `f64` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -542,15 +508,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `u16` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:99:39 +error[E0277]: `u16` cannot be safely transmuted into `u128` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:102:39 | LL | assert::is_transmutable::< u16, u128>(); - | ^^^^ `u16` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. + | ^^^^ The size of `u16` is smaller than the size of `u128` | - = help: the trait `BikeshedIntrinsicFrom<u16, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `u128` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -558,15 +523,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `u16` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:100:39 +error[E0277]: `u16` cannot be safely transmuted into `i128` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:103:39 | LL | assert::is_transmutable::< u16, i128>(); - | ^^^^ `u16` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. + | ^^^^ The size of `u16` is smaller than the size of `i128` | - = help: the trait `BikeshedIntrinsicFrom<u16, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `i128` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -574,15 +538,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `i32` cannot be safely transmuted into `u64` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:102:40 +error[E0277]: `i32` cannot be safely transmuted into `u64` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:105:40 | LL | assert::is_transmutable::< i32, u64>(); - | ^^^ `i32` cannot be safely transmuted into `u64` in the defining scope of `assert::Context`. + | ^^^ The size of `i32` is smaller than the size of `u64` | - = help: the trait `BikeshedIntrinsicFrom<i32, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `u64` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -590,15 +553,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `i32` cannot be safely transmuted into `i64` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:103:40 +error[E0277]: `i32` cannot be safely transmuted into `i64` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:106:40 | LL | assert::is_transmutable::< i32, i64>(); - | ^^^ `i32` cannot be safely transmuted into `i64` in the defining scope of `assert::Context`. + | ^^^ The size of `i32` is smaller than the size of `i64` | - = help: the trait `BikeshedIntrinsicFrom<i32, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `i64` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -606,15 +568,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `i32` cannot be safely transmuted into `f64` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:104:40 +error[E0277]: `i32` cannot be safely transmuted into `f64` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:107:40 | LL | assert::is_transmutable::< i32, f64>(); - | ^^^ `i32` cannot be safely transmuted into `f64` in the defining scope of `assert::Context`. + | ^^^ The size of `i32` is smaller than the size of `f64` | - = help: the trait `BikeshedIntrinsicFrom<i32, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `f64` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -622,15 +583,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `i32` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:105:39 +error[E0277]: `i32` cannot be safely transmuted into `u128` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:108:39 | LL | assert::is_transmutable::< i32, u128>(); - | ^^^^ `i32` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. + | ^^^^ The size of `i32` is smaller than the size of `u128` | - = help: the trait `BikeshedIntrinsicFrom<i32, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `u128` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -638,15 +598,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `i32` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:106:39 +error[E0277]: `i32` cannot be safely transmuted into `i128` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:109:39 | LL | assert::is_transmutable::< i32, i128>(); - | ^^^^ `i32` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. + | ^^^^ The size of `i32` is smaller than the size of `i128` | - = help: the trait `BikeshedIntrinsicFrom<i32, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `i128` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -654,15 +613,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `f32` cannot be safely transmuted into `u64` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:108:40 +error[E0277]: `f32` cannot be safely transmuted into `u64` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:111:40 | LL | assert::is_transmutable::< f32, u64>(); - | ^^^ `f32` cannot be safely transmuted into `u64` in the defining scope of `assert::Context`. + | ^^^ The size of `f32` is smaller than the size of `u64` | - = help: the trait `BikeshedIntrinsicFrom<f32, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `u64` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -670,15 +628,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `f32` cannot be safely transmuted into `i64` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:109:40 +error[E0277]: `f32` cannot be safely transmuted into `i64` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:112:40 | LL | assert::is_transmutable::< f32, i64>(); - | ^^^ `f32` cannot be safely transmuted into `i64` in the defining scope of `assert::Context`. + | ^^^ The size of `f32` is smaller than the size of `i64` | - = help: the trait `BikeshedIntrinsicFrom<f32, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `i64` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -686,15 +643,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `f32` cannot be safely transmuted into `f64` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:110:40 +error[E0277]: `f32` cannot be safely transmuted into `f64` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:113:40 | LL | assert::is_transmutable::< f32, f64>(); - | ^^^ `f32` cannot be safely transmuted into `f64` in the defining scope of `assert::Context`. + | ^^^ The size of `f32` is smaller than the size of `f64` | - = help: the trait `BikeshedIntrinsicFrom<f32, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `f64` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -702,15 +658,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `f32` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:111:39 +error[E0277]: `f32` cannot be safely transmuted into `u128` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:114:39 | LL | assert::is_transmutable::< f32, u128>(); - | ^^^^ `f32` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. + | ^^^^ The size of `f32` is smaller than the size of `u128` | - = help: the trait `BikeshedIntrinsicFrom<f32, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `u128` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -718,15 +673,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `f32` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:112:39 +error[E0277]: `f32` cannot be safely transmuted into `i128` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:115:39 | LL | assert::is_transmutable::< f32, i128>(); - | ^^^^ `f32` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. + | ^^^^ The size of `f32` is smaller than the size of `i128` | - = help: the trait `BikeshedIntrinsicFrom<f32, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `i128` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -734,15 +688,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `u32` cannot be safely transmuted into `u64` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:114:40 +error[E0277]: `u32` cannot be safely transmuted into `u64` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:117:40 | LL | assert::is_transmutable::< u32, u64>(); - | ^^^ `u32` cannot be safely transmuted into `u64` in the defining scope of `assert::Context`. + | ^^^ The size of `u32` is smaller than the size of `u64` | - = help: the trait `BikeshedIntrinsicFrom<u32, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `u64` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -750,15 +703,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `u32` cannot be safely transmuted into `i64` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:115:40 +error[E0277]: `u32` cannot be safely transmuted into `i64` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:118:40 | LL | assert::is_transmutable::< u32, i64>(); - | ^^^ `u32` cannot be safely transmuted into `i64` in the defining scope of `assert::Context`. + | ^^^ The size of `u32` is smaller than the size of `i64` | - = help: the trait `BikeshedIntrinsicFrom<u32, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `i64` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -766,15 +718,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `u32` cannot be safely transmuted into `f64` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:116:40 +error[E0277]: `u32` cannot be safely transmuted into `f64` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:119:40 | LL | assert::is_transmutable::< u32, f64>(); - | ^^^ `u32` cannot be safely transmuted into `f64` in the defining scope of `assert::Context`. + | ^^^ The size of `u32` is smaller than the size of `f64` | - = help: the trait `BikeshedIntrinsicFrom<u32, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `f64` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -782,15 +733,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `u32` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:117:39 +error[E0277]: `u32` cannot be safely transmuted into `u128` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:120:39 | LL | assert::is_transmutable::< u32, u128>(); - | ^^^^ `u32` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. + | ^^^^ The size of `u32` is smaller than the size of `u128` | - = help: the trait `BikeshedIntrinsicFrom<u32, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `u128` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -798,15 +748,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `u32` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:118:39 +error[E0277]: `u32` cannot be safely transmuted into `i128` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:121:39 | LL | assert::is_transmutable::< u32, i128>(); - | ^^^^ `u32` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. + | ^^^^ The size of `u32` is smaller than the size of `i128` | - = help: the trait `BikeshedIntrinsicFrom<u32, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `i128` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -814,15 +763,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `u64` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:120:39 +error[E0277]: `u64` cannot be safely transmuted into `u128` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:123:39 | LL | assert::is_transmutable::< u64, u128>(); - | ^^^^ `u64` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. + | ^^^^ The size of `u64` is smaller than the size of `u128` | - = help: the trait `BikeshedIntrinsicFrom<u64, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `u128` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -830,15 +778,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `u64` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:121:39 +error[E0277]: `u64` cannot be safely transmuted into `i128` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:124:39 | LL | assert::is_transmutable::< u64, i128>(); - | ^^^^ `u64` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. + | ^^^^ The size of `u64` is smaller than the size of `i128` | - = help: the trait `BikeshedIntrinsicFrom<u64, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `i128` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -846,15 +793,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `i64` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:123:39 +error[E0277]: `i64` cannot be safely transmuted into `u128` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:126:39 | LL | assert::is_transmutable::< i64, u128>(); - | ^^^^ `i64` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. + | ^^^^ The size of `i64` is smaller than the size of `u128` | - = help: the trait `BikeshedIntrinsicFrom<i64, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `u128` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -862,15 +808,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `i64` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:124:39 +error[E0277]: `i64` cannot be safely transmuted into `i128` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:127:39 | LL | assert::is_transmutable::< i64, i128>(); - | ^^^^ `i64` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. + | ^^^^ The size of `i64` is smaller than the size of `i128` | - = help: the trait `BikeshedIntrinsicFrom<i64, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `i128` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -878,15 +823,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `f64` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:126:39 +error[E0277]: `f64` cannot be safely transmuted into `u128` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:129:39 | LL | assert::is_transmutable::< f64, u128>(); - | ^^^^ `f64` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. + | ^^^^ The size of `f64` is smaller than the size of `u128` | - = help: the trait `BikeshedIntrinsicFrom<f64, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `u128` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function @@ -894,15 +838,14 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `f64` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:127:39 +error[E0277]: `f64` cannot be safely transmuted into `i128` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:130:39 | LL | assert::is_transmutable::< f64, i128>(); - | ^^^^ `f64` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. + | ^^^^ The size of `f64` is smaller than the size of `i128` | - = help: the trait `BikeshedIntrinsicFrom<f64, assert::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: false }>` is not implemented for `i128` note: required by a bound in `is_transmutable` - --> $DIR/numbers.rs:12:14 + --> $DIR/numbers.rs:15:14 | LL | pub fn is_transmutable<Src, Dst>() | --------------- required by a bound in this function diff --git a/tests/ui/transmutability/primitives/numbers.next.stderr b/tests/ui/transmutability/primitives/numbers.next.stderr new file mode 100644 index 000000000..d12e17297 --- /dev/null +++ b/tests/ui/transmutability/primitives/numbers.next.stderr @@ -0,0 +1,858 @@ +error[E0277]: `i8` cannot be safely transmuted into `i16` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:65:40 + | +LL | assert::is_transmutable::< i8, i16>(); + | ^^^ The size of `i8` is smaller than the size of `i16` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `i8` cannot be safely transmuted into `u16` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:66:40 + | +LL | assert::is_transmutable::< i8, u16>(); + | ^^^ The size of `i8` is smaller than the size of `u16` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `i8` cannot be safely transmuted into `i32` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:67:40 + | +LL | assert::is_transmutable::< i8, i32>(); + | ^^^ The size of `i8` is smaller than the size of `i32` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `i8` cannot be safely transmuted into `f32` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:68:40 + | +LL | assert::is_transmutable::< i8, f32>(); + | ^^^ The size of `i8` is smaller than the size of `f32` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `i8` cannot be safely transmuted into `u32` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:69:40 + | +LL | assert::is_transmutable::< i8, u32>(); + | ^^^ The size of `i8` is smaller than the size of `u32` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `i8` cannot be safely transmuted into `u64` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:70:40 + | +LL | assert::is_transmutable::< i8, u64>(); + | ^^^ The size of `i8` is smaller than the size of `u64` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `i8` cannot be safely transmuted into `i64` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:71:40 + | +LL | assert::is_transmutable::< i8, i64>(); + | ^^^ The size of `i8` is smaller than the size of `i64` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `i8` cannot be safely transmuted into `f64` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:72:40 + | +LL | assert::is_transmutable::< i8, f64>(); + | ^^^ The size of `i8` is smaller than the size of `f64` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `i8` cannot be safely transmuted into `u128` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:73:39 + | +LL | assert::is_transmutable::< i8, u128>(); + | ^^^^ The size of `i8` is smaller than the size of `u128` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `i8` cannot be safely transmuted into `i128` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:74:39 + | +LL | assert::is_transmutable::< i8, i128>(); + | ^^^^ The size of `i8` is smaller than the size of `i128` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `u8` cannot be safely transmuted into `i16` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:76:40 + | +LL | assert::is_transmutable::< u8, i16>(); + | ^^^ The size of `u8` is smaller than the size of `i16` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `u8` cannot be safely transmuted into `u16` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:77:40 + | +LL | assert::is_transmutable::< u8, u16>(); + | ^^^ The size of `u8` is smaller than the size of `u16` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `u8` cannot be safely transmuted into `i32` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:78:40 + | +LL | assert::is_transmutable::< u8, i32>(); + | ^^^ The size of `u8` is smaller than the size of `i32` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `u8` cannot be safely transmuted into `f32` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:79:40 + | +LL | assert::is_transmutable::< u8, f32>(); + | ^^^ The size of `u8` is smaller than the size of `f32` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `u8` cannot be safely transmuted into `u32` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:80:40 + | +LL | assert::is_transmutable::< u8, u32>(); + | ^^^ The size of `u8` is smaller than the size of `u32` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `u8` cannot be safely transmuted into `u64` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:81:40 + | +LL | assert::is_transmutable::< u8, u64>(); + | ^^^ The size of `u8` is smaller than the size of `u64` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `u8` cannot be safely transmuted into `i64` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:82:40 + | +LL | assert::is_transmutable::< u8, i64>(); + | ^^^ The size of `u8` is smaller than the size of `i64` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `u8` cannot be safely transmuted into `f64` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:83:40 + | +LL | assert::is_transmutable::< u8, f64>(); + | ^^^ The size of `u8` is smaller than the size of `f64` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `u8` cannot be safely transmuted into `u128` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:84:39 + | +LL | assert::is_transmutable::< u8, u128>(); + | ^^^^ The size of `u8` is smaller than the size of `u128` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `u8` cannot be safely transmuted into `i128` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:85:39 + | +LL | assert::is_transmutable::< u8, i128>(); + | ^^^^ The size of `u8` is smaller than the size of `i128` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `i16` cannot be safely transmuted into `i32` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:87:40 + | +LL | assert::is_transmutable::< i16, i32>(); + | ^^^ The size of `i16` is smaller than the size of `i32` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `i16` cannot be safely transmuted into `f32` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:88:40 + | +LL | assert::is_transmutable::< i16, f32>(); + | ^^^ The size of `i16` is smaller than the size of `f32` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `i16` cannot be safely transmuted into `u32` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:89:40 + | +LL | assert::is_transmutable::< i16, u32>(); + | ^^^ The size of `i16` is smaller than the size of `u32` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `i16` cannot be safely transmuted into `u64` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:90:40 + | +LL | assert::is_transmutable::< i16, u64>(); + | ^^^ The size of `i16` is smaller than the size of `u64` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `i16` cannot be safely transmuted into `i64` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:91:40 + | +LL | assert::is_transmutable::< i16, i64>(); + | ^^^ The size of `i16` is smaller than the size of `i64` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `i16` cannot be safely transmuted into `f64` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:92:40 + | +LL | assert::is_transmutable::< i16, f64>(); + | ^^^ The size of `i16` is smaller than the size of `f64` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `i16` cannot be safely transmuted into `u128` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:93:39 + | +LL | assert::is_transmutable::< i16, u128>(); + | ^^^^ The size of `i16` is smaller than the size of `u128` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `i16` cannot be safely transmuted into `i128` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:94:39 + | +LL | assert::is_transmutable::< i16, i128>(); + | ^^^^ The size of `i16` is smaller than the size of `i128` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `u16` cannot be safely transmuted into `i32` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:96:40 + | +LL | assert::is_transmutable::< u16, i32>(); + | ^^^ The size of `u16` is smaller than the size of `i32` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `u16` cannot be safely transmuted into `f32` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:97:40 + | +LL | assert::is_transmutable::< u16, f32>(); + | ^^^ The size of `u16` is smaller than the size of `f32` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `u16` cannot be safely transmuted into `u32` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:98:40 + | +LL | assert::is_transmutable::< u16, u32>(); + | ^^^ The size of `u16` is smaller than the size of `u32` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `u16` cannot be safely transmuted into `u64` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:99:40 + | +LL | assert::is_transmutable::< u16, u64>(); + | ^^^ The size of `u16` is smaller than the size of `u64` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `u16` cannot be safely transmuted into `i64` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:100:40 + | +LL | assert::is_transmutable::< u16, i64>(); + | ^^^ The size of `u16` is smaller than the size of `i64` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `u16` cannot be safely transmuted into `f64` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:101:40 + | +LL | assert::is_transmutable::< u16, f64>(); + | ^^^ The size of `u16` is smaller than the size of `f64` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `u16` cannot be safely transmuted into `u128` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:102:39 + | +LL | assert::is_transmutable::< u16, u128>(); + | ^^^^ The size of `u16` is smaller than the size of `u128` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `u16` cannot be safely transmuted into `i128` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:103:39 + | +LL | assert::is_transmutable::< u16, i128>(); + | ^^^^ The size of `u16` is smaller than the size of `i128` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `i32` cannot be safely transmuted into `u64` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:105:40 + | +LL | assert::is_transmutable::< i32, u64>(); + | ^^^ The size of `i32` is smaller than the size of `u64` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `i32` cannot be safely transmuted into `i64` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:106:40 + | +LL | assert::is_transmutable::< i32, i64>(); + | ^^^ The size of `i32` is smaller than the size of `i64` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `i32` cannot be safely transmuted into `f64` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:107:40 + | +LL | assert::is_transmutable::< i32, f64>(); + | ^^^ The size of `i32` is smaller than the size of `f64` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `i32` cannot be safely transmuted into `u128` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:108:39 + | +LL | assert::is_transmutable::< i32, u128>(); + | ^^^^ The size of `i32` is smaller than the size of `u128` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `i32` cannot be safely transmuted into `i128` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:109:39 + | +LL | assert::is_transmutable::< i32, i128>(); + | ^^^^ The size of `i32` is smaller than the size of `i128` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `f32` cannot be safely transmuted into `u64` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:111:40 + | +LL | assert::is_transmutable::< f32, u64>(); + | ^^^ The size of `f32` is smaller than the size of `u64` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `f32` cannot be safely transmuted into `i64` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:112:40 + | +LL | assert::is_transmutable::< f32, i64>(); + | ^^^ The size of `f32` is smaller than the size of `i64` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `f32` cannot be safely transmuted into `f64` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:113:40 + | +LL | assert::is_transmutable::< f32, f64>(); + | ^^^ The size of `f32` is smaller than the size of `f64` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `f32` cannot be safely transmuted into `u128` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:114:39 + | +LL | assert::is_transmutable::< f32, u128>(); + | ^^^^ The size of `f32` is smaller than the size of `u128` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `f32` cannot be safely transmuted into `i128` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:115:39 + | +LL | assert::is_transmutable::< f32, i128>(); + | ^^^^ The size of `f32` is smaller than the size of `i128` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `u32` cannot be safely transmuted into `u64` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:117:40 + | +LL | assert::is_transmutable::< u32, u64>(); + | ^^^ The size of `u32` is smaller than the size of `u64` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `u32` cannot be safely transmuted into `i64` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:118:40 + | +LL | assert::is_transmutable::< u32, i64>(); + | ^^^ The size of `u32` is smaller than the size of `i64` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `u32` cannot be safely transmuted into `f64` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:119:40 + | +LL | assert::is_transmutable::< u32, f64>(); + | ^^^ The size of `u32` is smaller than the size of `f64` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `u32` cannot be safely transmuted into `u128` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:120:39 + | +LL | assert::is_transmutable::< u32, u128>(); + | ^^^^ The size of `u32` is smaller than the size of `u128` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `u32` cannot be safely transmuted into `i128` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:121:39 + | +LL | assert::is_transmutable::< u32, i128>(); + | ^^^^ The size of `u32` is smaller than the size of `i128` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `u64` cannot be safely transmuted into `u128` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:123:39 + | +LL | assert::is_transmutable::< u64, u128>(); + | ^^^^ The size of `u64` is smaller than the size of `u128` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `u64` cannot be safely transmuted into `i128` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:124:39 + | +LL | assert::is_transmutable::< u64, i128>(); + | ^^^^ The size of `u64` is smaller than the size of `i128` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `i64` cannot be safely transmuted into `u128` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:126:39 + | +LL | assert::is_transmutable::< i64, u128>(); + | ^^^^ The size of `i64` is smaller than the size of `u128` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `i64` cannot be safely transmuted into `i128` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:127:39 + | +LL | assert::is_transmutable::< i64, i128>(); + | ^^^^ The size of `i64` is smaller than the size of `i128` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `f64` cannot be safely transmuted into `u128` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:129:39 + | +LL | assert::is_transmutable::< f64, u128>(); + | ^^^^ The size of `f64` is smaller than the size of `u128` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error[E0277]: `f64` cannot be safely transmuted into `i128` in the defining scope of `assert::Context` + --> $DIR/numbers.rs:130:39 + | +LL | assert::is_transmutable::< f64, i128>(); + | ^^^^ The size of `f64` is smaller than the size of `i128` + | +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` + +error: aborting due to 57 previous errors + +For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/transmutability/primitives/numbers.rs b/tests/ui/transmutability/primitives/numbers.rs index 0df43d204..e980e91ed 100644 --- a/tests/ui/transmutability/primitives/numbers.rs +++ b/tests/ui/transmutability/primitives/numbers.rs @@ -1,3 +1,6 @@ +// revisions: current next +//[next] compile-flags: -Ztrait-solver=next + #![crate_type = "lib"] #![feature(transmutability)] #![allow(dead_code)] diff --git a/tests/ui/transmutability/primitives/unit.stderr b/tests/ui/transmutability/primitives/unit.current.stderr index 988cd33b3..c49eb6097 100644 --- a/tests/ui/transmutability/primitives/unit.stderr +++ b/tests/ui/transmutability/primitives/unit.current.stderr @@ -1,12 +1,11 @@ -error[E0277]: `()` cannot be safely transmuted into `u8` in the defining scope of `should_have_correct_size::Context`. - --> $DIR/unit.rs:28:35 +error[E0277]: `()` cannot be safely transmuted into `u8` in the defining scope of `should_have_correct_size::Context` + --> $DIR/unit.rs:31:35 | LL | assert::is_transmutable::<(), u8, Context>(); - | ^^ `()` cannot be safely transmuted into `u8` in the defining scope of `should_have_correct_size::Context`. + | ^^ The size of `()` is smaller than the size of `u8` | - = help: the trait `BikeshedIntrinsicFrom<(), should_have_correct_size::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: true }>` is not implemented for `u8` note: required by a bound in `is_transmutable` - --> $DIR/unit.rs:12:14 + --> $DIR/unit.rs:15:14 | LL | pub fn is_transmutable<Src, Dst, Context>() | --------------- required by a bound in this function diff --git a/tests/ui/transmutability/primitives/unit.next.stderr b/tests/ui/transmutability/primitives/unit.next.stderr new file mode 100644 index 000000000..c49eb6097 --- /dev/null +++ b/tests/ui/transmutability/primitives/unit.next.stderr @@ -0,0 +1,24 @@ +error[E0277]: `()` cannot be safely transmuted into `u8` in the defining scope of `should_have_correct_size::Context` + --> $DIR/unit.rs:31:35 + | +LL | assert::is_transmutable::<(), u8, Context>(); + | ^^ The size of `()` is smaller than the size of `u8` + | +note: required by a bound in `is_transmutable` + --> $DIR/unit.rs:15:14 + | +LL | pub fn is_transmutable<Src, Dst, Context>() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context, { + | ______________^ +LL | | Assume::ALIGNMENT +LL | | .and(Assume::LIFETIMES) +LL | | .and(Assume::SAFETY) +LL | | .and(Assume::VALIDITY) +LL | | }> + | |__________^ required by this bound in `is_transmutable` + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/transmutability/primitives/unit.rs b/tests/ui/transmutability/primitives/unit.rs index 1975a61de..12eac1751 100644 --- a/tests/ui/transmutability/primitives/unit.rs +++ b/tests/ui/transmutability/primitives/unit.rs @@ -1,3 +1,6 @@ +// revisions: current next +//[next] compile-flags: -Ztrait-solver=next + //! The unit type, `()`, should be one byte. #![crate_type = "lib"] diff --git a/tests/ui/transmutability/references.stderr b/tests/ui/transmutability/references.current.stderr index eb3bd03fd..ecb095354 100644 --- a/tests/ui/transmutability/references.stderr +++ b/tests/ui/transmutability/references.current.stderr @@ -1,12 +1,11 @@ -error[E0277]: `&'static Unit` cannot be safely transmuted into `&'static Unit` in the defining scope of `assert::Context`. - --> $DIR/references.rs:26:52 +error[E0277]: `&'static Unit` cannot be safely transmuted into `&'static Unit` in the defining scope of `assert::Context` + --> $DIR/references.rs:29:52 | LL | assert::is_maybe_transmutable::<&'static Unit, &'static Unit>(); - | ^^^^^^^^^^^^^ `&'static Unit` cannot be safely transmuted into `&'static Unit` in the defining scope of `assert::Context`. + | ^^^^^^^^^^^^^ `&'static Unit` does not have a well-specified layout | - = help: the trait `BikeshedIntrinsicFrom<&'static Unit, assert::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: true }>` is not implemented for `&'static Unit` note: required by a bound in `is_maybe_transmutable` - --> $DIR/references.rs:13:14 + --> $DIR/references.rs:16:14 | LL | pub fn is_maybe_transmutable<Src, Dst>() | --------------------- required by a bound in this function diff --git a/tests/ui/transmutability/references.next.stderr b/tests/ui/transmutability/references.next.stderr new file mode 100644 index 000000000..ecb095354 --- /dev/null +++ b/tests/ui/transmutability/references.next.stderr @@ -0,0 +1,25 @@ +error[E0277]: `&'static Unit` cannot be safely transmuted into `&'static Unit` in the defining scope of `assert::Context` + --> $DIR/references.rs:29:52 + | +LL | assert::is_maybe_transmutable::<&'static Unit, &'static Unit>(); + | ^^^^^^^^^^^^^ `&'static Unit` does not have a well-specified layout + | +note: required by a bound in `is_maybe_transmutable` + --> $DIR/references.rs:16:14 + | +LL | pub fn is_maybe_transmutable<Src, Dst>() + | --------------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom<Src, Context, { + | ______________^ +LL | | Assume { +LL | | alignment: true, +LL | | lifetimes: true, +... | +LL | | } +LL | | }> + | |__________^ required by this bound in `is_maybe_transmutable` + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/transmutability/references.rs b/tests/ui/transmutability/references.rs index af3ff0ec1..8c2b25ebb 100644 --- a/tests/ui/transmutability/references.rs +++ b/tests/ui/transmutability/references.rs @@ -1,3 +1,6 @@ +// revisions: current next +//[next] compile-flags: -Ztrait-solver=next + //! Transmutations involving references are not yet supported. #![crate_type = "lib"] diff --git a/tests/ui/transmutability/structs/repr/should_require_well_defined_layout.stderr b/tests/ui/transmutability/structs/repr/should_require_well_defined_layout.stderr index d9aebac64..4c5062cd3 100644 --- a/tests/ui/transmutability/structs/repr/should_require_well_defined_layout.stderr +++ b/tests/ui/transmutability/structs/repr/should_require_well_defined_layout.stderr @@ -1,10 +1,9 @@ -error[E0277]: `should_reject_repr_rust::unit::repr_rust` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. +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:28:52 | LL | assert::is_maybe_transmutable::<repr_rust, ()>(); - | ^^ `should_reject_repr_rust::unit::repr_rust` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. + | ^^ `should_reject_repr_rust::unit::repr_rust` does not have a well-specified layout | - = help: the trait `BikeshedIntrinsicFrom<should_reject_repr_rust::unit::repr_rust, assert::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: true }>` is not implemented for `()` note: required by a bound in `is_maybe_transmutable` --> $DIR/should_require_well_defined_layout.rs:13:14 | @@ -21,13 +20,12 @@ LL | | } LL | | }> | |__________^ required by this bound in `is_maybe_transmutable` -error[E0277]: `u128` cannot be safely transmuted into `should_reject_repr_rust::unit::repr_rust` in the defining scope of `assert::Context`. +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:29:47 | LL | assert::is_maybe_transmutable::<u128, repr_rust>(); - | ^^^^^^^^^ `u128` cannot be safely transmuted into `should_reject_repr_rust::unit::repr_rust` in the defining scope of `assert::Context`. + | ^^^^^^^^^ `should_reject_repr_rust::unit::repr_rust` does not have a well-specified layout | - = help: the trait `BikeshedIntrinsicFrom<u128, assert::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: 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 | @@ -44,13 +42,12 @@ LL | | } LL | | }> | |__________^ required by this bound in `is_maybe_transmutable` -error[E0277]: `should_reject_repr_rust::tuple::repr_rust` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. +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:34:52 | LL | assert::is_maybe_transmutable::<repr_rust, ()>(); - | ^^ `should_reject_repr_rust::tuple::repr_rust` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. + | ^^ `should_reject_repr_rust::tuple::repr_rust` does not have a well-specified layout | - = help: the trait `BikeshedIntrinsicFrom<should_reject_repr_rust::tuple::repr_rust, assert::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: true }>` is not implemented for `()` note: required by a bound in `is_maybe_transmutable` --> $DIR/should_require_well_defined_layout.rs:13:14 | @@ -67,13 +64,12 @@ LL | | } LL | | }> | |__________^ required by this bound in `is_maybe_transmutable` -error[E0277]: `u128` cannot be safely transmuted into `should_reject_repr_rust::tuple::repr_rust` in the defining scope of `assert::Context`. +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:35:47 | LL | assert::is_maybe_transmutable::<u128, repr_rust>(); - | ^^^^^^^^^ `u128` cannot be safely transmuted into `should_reject_repr_rust::tuple::repr_rust` in the defining scope of `assert::Context`. + | ^^^^^^^^^ `should_reject_repr_rust::tuple::repr_rust` does not have a well-specified layout | - = help: the trait `BikeshedIntrinsicFrom<u128, assert::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: 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 | @@ -90,13 +86,12 @@ LL | | } LL | | }> | |__________^ required by this bound in `is_maybe_transmutable` -error[E0277]: `should_reject_repr_rust::braces::repr_rust` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. +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:40:52 | LL | assert::is_maybe_transmutable::<repr_rust, ()>(); - | ^^ `should_reject_repr_rust::braces::repr_rust` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. + | ^^ `should_reject_repr_rust::braces::repr_rust` does not have a well-specified layout | - = help: the trait `BikeshedIntrinsicFrom<should_reject_repr_rust::braces::repr_rust, assert::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: true }>` is not implemented for `()` note: required by a bound in `is_maybe_transmutable` --> $DIR/should_require_well_defined_layout.rs:13:14 | @@ -113,13 +108,12 @@ LL | | } LL | | }> | |__________^ required by this bound in `is_maybe_transmutable` -error[E0277]: `u128` cannot be safely transmuted into `should_reject_repr_rust::braces::repr_rust` in the defining scope of `assert::Context`. +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:41:47 | LL | assert::is_maybe_transmutable::<u128, repr_rust>(); - | ^^^^^^^^^ `u128` cannot be safely transmuted into `should_reject_repr_rust::braces::repr_rust` in the defining scope of `assert::Context`. + | ^^^^^^^^^ `should_reject_repr_rust::braces::repr_rust` does not have a well-specified layout | - = help: the trait `BikeshedIntrinsicFrom<u128, assert::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: 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 | @@ -136,13 +130,12 @@ LL | | } LL | | }> | |__________^ required by this bound in `is_maybe_transmutable` -error[E0277]: `aligned::repr_rust` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. +error[E0277]: `aligned::repr_rust` cannot be safely transmuted into `()` in the defining scope of `assert::Context` --> $DIR/should_require_well_defined_layout.rs:46:52 | LL | assert::is_maybe_transmutable::<repr_rust, ()>(); - | ^^ `aligned::repr_rust` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. + | ^^ `aligned::repr_rust` does not have a well-specified layout | - = help: the trait `BikeshedIntrinsicFrom<aligned::repr_rust, assert::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: true }>` is not implemented for `()` note: required by a bound in `is_maybe_transmutable` --> $DIR/should_require_well_defined_layout.rs:13:14 | @@ -159,13 +152,12 @@ LL | | } LL | | }> | |__________^ required by this bound in `is_maybe_transmutable` -error[E0277]: `u128` cannot be safely transmuted into `aligned::repr_rust` in the defining scope of `assert::Context`. +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:47:47 | LL | assert::is_maybe_transmutable::<u128, repr_rust>(); - | ^^^^^^^^^ `u128` cannot be safely transmuted into `aligned::repr_rust` in the defining scope of `assert::Context`. + | ^^^^^^^^^ `aligned::repr_rust` does not have a well-specified layout | - = help: the trait `BikeshedIntrinsicFrom<u128, assert::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: 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 | @@ -182,13 +174,12 @@ LL | | } LL | | }> | |__________^ required by this bound in `is_maybe_transmutable` -error[E0277]: `packed::repr_rust` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. +error[E0277]: `packed::repr_rust` cannot be safely transmuted into `()` in the defining scope of `assert::Context` --> $DIR/should_require_well_defined_layout.rs:52:52 | LL | assert::is_maybe_transmutable::<repr_rust, ()>(); - | ^^ `packed::repr_rust` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. + | ^^ `packed::repr_rust` does not have a well-specified layout | - = help: the trait `BikeshedIntrinsicFrom<packed::repr_rust, assert::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: true }>` is not implemented for `()` note: required by a bound in `is_maybe_transmutable` --> $DIR/should_require_well_defined_layout.rs:13:14 | @@ -205,13 +196,12 @@ LL | | } LL | | }> | |__________^ required by this bound in `is_maybe_transmutable` -error[E0277]: `u128` cannot be safely transmuted into `packed::repr_rust` in the defining scope of `assert::Context`. +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:53:47 | LL | assert::is_maybe_transmutable::<u128, repr_rust>(); - | ^^^^^^^^^ `u128` cannot be safely transmuted into `packed::repr_rust` in the defining scope of `assert::Context`. + | ^^^^^^^^^ `packed::repr_rust` does not have a well-specified layout | - = help: the trait `BikeshedIntrinsicFrom<u128, assert::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: 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 | @@ -228,13 +218,12 @@ LL | | } LL | | }> | |__________^ required by this bound in `is_maybe_transmutable` -error[E0277]: `nested::repr_c` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. +error[E0277]: `nested::repr_c` cannot be safely transmuted into `()` in the defining scope of `assert::Context` --> $DIR/should_require_well_defined_layout.rs:59:49 | LL | assert::is_maybe_transmutable::<repr_c, ()>(); - | ^^ `nested::repr_c` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. + | ^^ `nested::repr_c` does not have a well-specified layout | - = help: the trait `BikeshedIntrinsicFrom<nested::repr_c, assert::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: true }>` is not implemented for `()` note: required by a bound in `is_maybe_transmutable` --> $DIR/should_require_well_defined_layout.rs:13:14 | @@ -251,13 +240,12 @@ LL | | } LL | | }> | |__________^ required by this bound in `is_maybe_transmutable` -error[E0277]: `u128` cannot be safely transmuted into `nested::repr_c` in the defining scope of `assert::Context`. +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:60:47 | LL | assert::is_maybe_transmutable::<u128, repr_c>(); - | ^^^^^^ `u128` cannot be safely transmuted into `nested::repr_c` in the defining scope of `assert::Context`. + | ^^^^^^ `nested::repr_c` does not have a well-specified layout | - = help: the trait `BikeshedIntrinsicFrom<u128, assert::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: 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/tests/ui/transmutability/unions/repr/should_require_well_defined_layout.stderr b/tests/ui/transmutability/unions/repr/should_require_well_defined_layout.stderr index aa0cbc51b..4293d34f4 100644 --- a/tests/ui/transmutability/unions/repr/should_require_well_defined_layout.stderr +++ b/tests/ui/transmutability/unions/repr/should_require_well_defined_layout.stderr @@ -1,10 +1,9 @@ -error[E0277]: `should_reject_repr_rust::repr_rust` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. +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:30:48 | LL | assert::is_maybe_transmutable::<repr_rust, ()>(); - | ^^ `should_reject_repr_rust::repr_rust` cannot be safely transmuted into `()` in the defining scope of `assert::Context`. + | ^^ `should_reject_repr_rust::repr_rust` does not have a well-specified layout | - = help: the trait `BikeshedIntrinsicFrom<should_reject_repr_rust::repr_rust, assert::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: true }>` is not implemented for `()` note: required by a bound in `is_maybe_transmutable` --> $DIR/should_require_well_defined_layout.rs:13:14 | @@ -21,13 +20,12 @@ LL | | } LL | | }> | |__________^ required by this bound in `is_maybe_transmutable` -error[E0277]: `u128` cannot be safely transmuted into `should_reject_repr_rust::repr_rust` in the defining scope of `assert::Context`. +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:31:43 | LL | assert::is_maybe_transmutable::<u128, repr_rust>(); - | ^^^^^^^^^ `u128` cannot be safely transmuted into `should_reject_repr_rust::repr_rust` in the defining scope of `assert::Context`. + | ^^^^^^^^^ `should_reject_repr_rust::repr_rust` does not have a well-specified layout | - = help: the trait `BikeshedIntrinsicFrom<u128, assert::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: 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/tests/ui/transmutability/unions/should_pad_variants.stderr b/tests/ui/transmutability/unions/should_pad_variants.stderr index f4988239d..bfbef8b25 100644 --- a/tests/ui/transmutability/unions/should_pad_variants.stderr +++ b/tests/ui/transmutability/unions/should_pad_variants.stderr @@ -1,10 +1,9 @@ -error[E0277]: `Src` cannot be safely transmuted into `Dst` in the defining scope of `should_pad_variants::Context`. +error[E0277]: `Src` cannot be safely transmuted into `Dst` in the defining scope of `should_pad_variants::Context` --> $DIR/should_pad_variants.rs:44:36 | LL | assert::is_transmutable::<Src, Dst, Context>(); - | ^^^ `Src` cannot be safely transmuted into `Dst` in the defining scope of `should_pad_variants::Context`. + | ^^^ The size of `Src` is smaller than the size of `Dst` | - = help: the trait `BikeshedIntrinsicFrom<Src, should_pad_variants::Context, Assume { alignment: true, lifetimes: true, safety: true, validity: true }>` is not implemented for `Dst` note: required by a bound in `is_transmutable` --> $DIR/should_pad_variants.rs:13:14 | diff --git a/tests/ui/transmutability/unions/should_reject_contraction.stderr b/tests/ui/transmutability/unions/should_reject_contraction.stderr index fa7dcc3d2..553f655a1 100644 --- a/tests/ui/transmutability/unions/should_reject_contraction.stderr +++ b/tests/ui/transmutability/unions/should_reject_contraction.stderr @@ -1,10 +1,9 @@ -error[E0277]: `Superset` cannot be safely transmuted into `Subset` in the defining scope of `assert::Context`. +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>(); - | ^^^^^^ `Superset` cannot be safely transmuted into `Subset` in the defining scope of `assert::Context`. + | ^^^^^^ At least one value of `Superset` isn't a bit-valid value of `Subset` | - = help: the trait `BikeshedIntrinsicFrom<Superset, assert::Context, Assume { alignment: false, lifetimes: false, safety: true, validity: false }>` is not implemented for `Subset` note: required by a bound in `is_transmutable` --> $DIR/should_reject_contraction.rs:13:14 | diff --git a/tests/ui/transmutability/unions/should_reject_disjoint.stderr b/tests/ui/transmutability/unions/should_reject_disjoint.stderr index 880e4cd89..178ae6f08 100644 --- a/tests/ui/transmutability/unions/should_reject_disjoint.stderr +++ b/tests/ui/transmutability/unions/should_reject_disjoint.stderr @@ -1,10 +1,9 @@ -error[E0277]: `A` cannot be safely transmuted into `B` in the defining scope of `assert::Context`. +error[E0277]: `A` cannot be safely transmuted into `B` in the defining scope of `assert::Context` --> $DIR/should_reject_disjoint.rs:33:40 | LL | assert::is_maybe_transmutable::<A, B>(); - | ^ `A` cannot be safely transmuted into `B` in the defining scope of `assert::Context`. + | ^ At least one value of `A` isn't a bit-valid value of `B` | - = help: the trait `BikeshedIntrinsicFrom<A, assert::Context, Assume { alignment: false, lifetimes: false, safety: true, validity: true }>` is not implemented for `B` note: required by a bound in `is_maybe_transmutable` --> $DIR/should_reject_disjoint.rs:13:14 | @@ -14,13 +13,12 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context, { Assume::SAFETY.and(Assume::VALIDITY) }> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable` -error[E0277]: `B` cannot be safely transmuted into `A` in the defining scope of `assert::Context`. +error[E0277]: `B` cannot be safely transmuted into `A` in the defining scope of `assert::Context` --> $DIR/should_reject_disjoint.rs:34:40 | LL | assert::is_maybe_transmutable::<B, A>(); - | ^ `B` cannot be safely transmuted into `A` in the defining scope of `assert::Context`. + | ^ At least one value of `B` isn't a bit-valid value of `A` | - = help: the trait `BikeshedIntrinsicFrom<B, assert::Context, Assume { alignment: false, lifetimes: false, safety: true, validity: 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/tests/ui/transmutability/unions/should_reject_intersecting.stderr b/tests/ui/transmutability/unions/should_reject_intersecting.stderr index 501760b08..73c29ab1c 100644 --- a/tests/ui/transmutability/unions/should_reject_intersecting.stderr +++ b/tests/ui/transmutability/unions/should_reject_intersecting.stderr @@ -1,10 +1,9 @@ -error[E0277]: `A` cannot be safely transmuted into `B` in the defining scope of `assert::Context`. +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>(); - | ^ `A` cannot be safely transmuted into `B` in the defining scope of `assert::Context`. + | ^ At least one value of `A` isn't a bit-valid value of `B` | - = help: the trait `BikeshedIntrinsicFrom<A, assert::Context, Assume { alignment: false, lifetimes: false, safety: true, validity: false }>` is not implemented for `B` note: required by a bound in `is_transmutable` --> $DIR/should_reject_intersecting.rs:14:14 | @@ -14,13 +13,12 @@ LL | where LL | Dst: BikeshedIntrinsicFrom<Src, Context, { Assume::SAFETY }> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error[E0277]: `B` cannot be safely transmuted into `A` in the defining scope of `assert::Context`. +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>(); - | ^ `B` cannot be safely transmuted into `A` in the defining scope of `assert::Context`. + | ^ At least one value of `B` isn't a bit-valid value of `A` | - = help: the trait `BikeshedIntrinsicFrom<B, assert::Context, Assume { alignment: false, lifetimes: false, safety: true, validity: false }>` is not implemented for `A` note: required by a bound in `is_transmutable` --> $DIR/should_reject_intersecting.rs:14:14 | diff --git a/tests/ui/transmutability/visibility/should_reject_if_dst_has_private_field.stderr b/tests/ui/transmutability/visibility/should_reject_if_dst_has_private_field.stderr index afbba653b..863ada3c2 100644 --- a/tests/ui/transmutability/visibility/should_reject_if_dst_has_private_field.stderr +++ b/tests/ui/transmutability/visibility/should_reject_if_dst_has_private_field.stderr @@ -1,10 +1,9 @@ -error[E0277]: `Src` cannot be safely transmuted into `Dst` in the defining scope of `test::Context`. +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:35:41 | LL | assert::is_transmutable::<src::Src, dst::Dst, Context>(); - | ^^^^^^^^ `Src` cannot be safely transmuted into `Dst` in the defining scope of `test::Context`. + | ^^^^^^^^ `Dst` is or contains a type or field that is not visible in that scope | - = help: the trait `BikeshedIntrinsicFrom<Src, test::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: 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/tests/ui/transmutability/visibility/should_reject_if_dst_has_private_variant.stderr b/tests/ui/transmutability/visibility/should_reject_if_dst_has_private_variant.stderr index f14b5d8b2..7b0f1b4d5 100644 --- a/tests/ui/transmutability/visibility/should_reject_if_dst_has_private_variant.stderr +++ b/tests/ui/transmutability/visibility/should_reject_if_dst_has_private_variant.stderr @@ -1,10 +1,9 @@ -error[E0277]: `Src` cannot be safely transmuted into `Dst` in the defining scope of `test::Context`. +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:36:41 | LL | assert::is_transmutable::<src::Src, dst::Dst, Context>(); - | ^^^^^^^^ `Src` cannot be safely transmuted into `Dst` in the defining scope of `test::Context`. + | ^^^^^^^^ `Dst` is or contains a type or field that is not visible in that scope | - = help: the trait `BikeshedIntrinsicFrom<Src, test::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: 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/tests/ui/transmutability/visibility/should_reject_if_dst_has_unreachable_field.stderr b/tests/ui/transmutability/visibility/should_reject_if_dst_has_unreachable_field.stderr index 01ae8bea2..df19477ef 100644 --- a/tests/ui/transmutability/visibility/should_reject_if_dst_has_unreachable_field.stderr +++ b/tests/ui/transmutability/visibility/should_reject_if_dst_has_unreachable_field.stderr @@ -1,10 +1,9 @@ -error[E0277]: `Src` cannot be safely transmuted into `Dst` in the defining scope of `test::Context`. +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:37:41 | LL | assert::is_transmutable::<src::Src, dst::Dst, Context>(); - | ^^^^^^^^ `Src` cannot be safely transmuted into `Dst` in the defining scope of `test::Context`. + | ^^^^^^^^ `Dst` is or contains a type or field that is not visible in that scope | - = help: the trait `BikeshedIntrinsicFrom<Src, test::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: 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/tests/ui/transmutability/visibility/should_reject_if_dst_has_unreachable_ty.stderr b/tests/ui/transmutability/visibility/should_reject_if_dst_has_unreachable_ty.stderr index 20a680a74..ea488980c 100644 --- a/tests/ui/transmutability/visibility/should_reject_if_dst_has_unreachable_ty.stderr +++ b/tests/ui/transmutability/visibility/should_reject_if_dst_has_unreachable_ty.stderr @@ -10,13 +10,12 @@ note: the struct `Dst` is defined here LL | #[repr(C)] pub(self) struct Dst { | ^^^^^^^^^^^^^^^^^^^^ -error[E0277]: `Src` cannot be safely transmuted into `Dst` in the defining scope of `test::Context`. +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:38:41 | LL | assert::is_transmutable::<src::Src, dst::Dst, Context>(); - | ^^^^^^^^ `Src` cannot be safely transmuted into `Dst` in the defining scope of `test::Context`. + | ^^^^^^^^ `Dst` is or contains a type or field that is not visible in that scope | - = help: the trait `BikeshedIntrinsicFrom<Src, test::Context, Assume { alignment: false, lifetimes: false, safety: false, validity: 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 | |