From d92f74e43b76a7ec37d2ef7dfe6d930331ff5157 Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Sun, 9 Apr 2023 00:09:53 +0000 Subject: [PATCH 1/2] Support safe transmute in new solver --- compiler/rustc_middle/src/ty/visit.rs | 3 ++ .../src/solve/assembly/mod.rs | 7 +++++ .../src/solve/eval_ctxt.rs | 21 ++++++++++++++ .../src/solve/project_goals.rs | 7 +++++ .../src/solve/trait_goals.rs | 29 +++++++++++++++++++ 5 files changed, 67 insertions(+) diff --git a/compiler/rustc_middle/src/ty/visit.rs b/compiler/rustc_middle/src/ty/visit.rs index 6814cadb9a8e4..08a62c900f972 100644 --- a/compiler/rustc_middle/src/ty/visit.rs +++ b/compiler/rustc_middle/src/ty/visit.rs @@ -83,6 +83,9 @@ pub trait TypeVisitableExt<'tcx>: TypeVisitable> { | TypeFlags::HAS_CT_PLACEHOLDER, ) } + fn has_non_region_placeholders(&self) -> bool { + self.has_type_flags(TypeFlags::HAS_TY_PLACEHOLDER | TypeFlags::HAS_CT_PLACEHOLDER) + } fn needs_subst(&self) -> bool { self.has_type_flags(TypeFlags::NEEDS_SUBST) } diff --git a/compiler/rustc_trait_selection/src/solve/assembly/mod.rs b/compiler/rustc_trait_selection/src/solve/assembly/mod.rs index 12ee80b6722b1..a33e8ef4b4a3c 100644 --- a/compiler/rustc_trait_selection/src/solve/assembly/mod.rs +++ b/compiler/rustc_trait_selection/src/solve/assembly/mod.rs @@ -225,6 +225,11 @@ pub(super) trait GoalKind<'tcx>: TypeFoldable> + Copy + Eq { ecx: &mut EvalCtxt<'_, 'tcx>, goal: Goal<'tcx, Self>, ) -> QueryResult<'tcx>; + + fn consider_builtin_transmute_candidate( + ecx: &mut EvalCtxt<'_, 'tcx>, + goal: Goal<'tcx, Self>, + ) -> QueryResult<'tcx>; } impl<'tcx> EvalCtxt<'_, 'tcx> { @@ -373,6 +378,8 @@ impl<'tcx> EvalCtxt<'_, 'tcx> { G::consider_builtin_discriminant_kind_candidate(self, goal) } else if lang_items.destruct_trait() == Some(trait_def_id) { G::consider_builtin_destruct_candidate(self, goal) + } else if lang_items.transmute_trait() == Some(trait_def_id) { + G::consider_builtin_transmute_candidate(self, goal) } else { Err(NoSolution) }; diff --git a/compiler/rustc_trait_selection/src/solve/eval_ctxt.rs b/compiler/rustc_trait_selection/src/solve/eval_ctxt.rs index 28aca76cceb66..c29b5b04e000a 100644 --- a/compiler/rustc_trait_selection/src/solve/eval_ctxt.rs +++ b/compiler/rustc_trait_selection/src/solve/eval_ctxt.rs @@ -639,4 +639,25 @@ impl<'tcx> EvalCtxt<'_, 'tcx> { crate::traits::wf::unnormalized_obligations(self.infcx, param_env, arg) .map(|obligations| obligations.into_iter().map(|obligation| obligation.into())) } + + pub(super) fn is_transmutable( + &self, + src_and_dst: rustc_transmute::Types<'tcx>, + scope: Ty<'tcx>, + assume: rustc_transmute::Assume, + ) -> Result { + // FIXME(transmutability): This really should be returning nested goals for `Answer::If*` + match rustc_transmute::TransmuteTypeEnv::new(self.infcx).is_transmutable( + ObligationCause::dummy(), + ty::Binder::dummy(src_and_dst), + scope, + assume, + ) { + rustc_transmute::Answer::Yes => Ok(Certainty::Yes), + rustc_transmute::Answer::No(_) + | rustc_transmute::Answer::IfTransmutable { .. } + | rustc_transmute::Answer::IfAll(_) + | rustc_transmute::Answer::IfAny(_) => Err(NoSolution), + } + } } diff --git a/compiler/rustc_trait_selection/src/solve/project_goals.rs b/compiler/rustc_trait_selection/src/solve/project_goals.rs index 2a47da81ec760..14cb43b89c3aa 100644 --- a/compiler/rustc_trait_selection/src/solve/project_goals.rs +++ b/compiler/rustc_trait_selection/src/solve/project_goals.rs @@ -524,6 +524,13 @@ impl<'tcx> assembly::GoalKind<'tcx> for ProjectionPredicate<'tcx> { ) -> QueryResult<'tcx> { bug!("`Destruct` does not have an associated type: {:?}", goal); } + + fn consider_builtin_transmute_candidate( + _ecx: &mut EvalCtxt<'_, 'tcx>, + goal: Goal<'tcx, Self>, + ) -> QueryResult<'tcx> { + bug!("`BikeshedIntrinsicFrom` does not have an associated type: {:?}", goal) + } } /// This behavior is also implemented in `rustc_ty_utils` and in the old `project` code. diff --git a/compiler/rustc_trait_selection/src/solve/trait_goals.rs b/compiler/rustc_trait_selection/src/solve/trait_goals.rs index 81f89fd950c8d..c7375c9ffa64b 100644 --- a/compiler/rustc_trait_selection/src/solve/trait_goals.rs +++ b/compiler/rustc_trait_selection/src/solve/trait_goals.rs @@ -556,6 +556,35 @@ impl<'tcx> assembly::GoalKind<'tcx> for TraitPredicate<'tcx> { Err(NoSolution) } } + + fn consider_builtin_transmute_candidate( + ecx: &mut EvalCtxt<'_, 'tcx>, + goal: Goal<'tcx, Self>, + ) -> QueryResult<'tcx> { + // `rustc_transmute` does not have support for type or const params + if goal.has_non_region_placeholders() { + return Err(NoSolution); + } + + // Erase regions because we compute layouts in `rustc_transmute`, + // which will ICE for region vars. + let substs = ecx.tcx().erase_regions(goal.predicate.trait_ref.substs); + + let Some(assume) = rustc_transmute::Assume::from_const( + ecx.tcx(), + goal.param_env, + substs.const_at(3), + ) else { + return Err(NoSolution); + }; + + let certainty = ecx.is_transmutable( + rustc_transmute::Types { dst: substs.type_at(0), src: substs.type_at(1) }, + substs.type_at(2), + assume, + )?; + ecx.evaluate_added_goals_and_make_canonical_response(certainty) + } } impl<'tcx> EvalCtxt<'_, 'tcx> { From 4adee91eac5f9cbe32078303f391cf30671ec61a Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Sun, 9 Apr 2023 21:22:18 +0000 Subject: [PATCH 2/2] tests --- .../{bool.stderr => bool.current.stderr} | 4 +- .../primitives/bool.next.stderr | 19 + tests/ui/transmutability/primitives/bool.rs | 4 +- ...{numbers.stderr => numbers.current.stderr} | 228 ++--- .../primitives/numbers.next.stderr | 915 ++++++++++++++++++ .../ui/transmutability/primitives/numbers.rs | 3 + .../{unit.stderr => unit.current.stderr} | 4 +- .../primitives/unit.next.stderr | 25 + tests/ui/transmutability/primitives/unit.rs | 3 + ...ences.stderr => references.current.stderr} | 4 +- .../ui/transmutability/references.next.stderr | 26 + tests/ui/transmutability/references.rs | 3 + 12 files changed, 1117 insertions(+), 121 deletions(-) rename tests/ui/transmutability/primitives/{bool.stderr => bool.current.stderr} (94%) create mode 100644 tests/ui/transmutability/primitives/bool.next.stderr rename tests/ui/transmutability/primitives/{numbers.stderr => numbers.current.stderr} (94%) create mode 100644 tests/ui/transmutability/primitives/numbers.next.stderr rename tests/ui/transmutability/primitives/{unit.stderr => unit.current.stderr} (95%) create mode 100644 tests/ui/transmutability/primitives/unit.next.stderr rename tests/ui/transmutability/{references.stderr => references.current.stderr} (95%) create mode 100644 tests/ui/transmutability/references.next.stderr diff --git a/tests/ui/transmutability/primitives/bool.stderr b/tests/ui/transmutability/primitives/bool.current.stderr similarity index 94% rename from tests/ui/transmutability/primitives/bool.stderr rename to tests/ui/transmutability/primitives/bool.current.stderr index 22decf15e546b..999302224eebf 100644 --- a/tests/ui/transmutability/primitives/bool.stderr +++ b/tests/ui/transmutability/primitives/bool.current.stderr @@ -1,12 +1,12 @@ error[E0277]: `u8` cannot be safely transmuted into `bool` in the defining scope of `assert::Context`. - --> $DIR/bool.rs:22:35 + --> $DIR/bool.rs:24:35 | LL | assert::is_transmutable::(); | ^^^^ `u8` cannot be safely transmuted into `bool` in the defining scope of `assert::Context`. | = help: the trait `BikeshedIntrinsicFrom` is not implemented for `bool` note: required by a bound in `is_transmutable` - --> $DIR/bool.rs:12:14 + --> $DIR/bool.rs:14:14 | LL | pub fn is_transmutable() | --------------- 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 0000000000000..999302224eebf --- /dev/null +++ b/tests/ui/transmutability/primitives/bool.next.stderr @@ -0,0 +1,19 @@ +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` cannot be safely transmuted into `bool` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `bool` +note: required by a bound in `is_transmutable` + --> $DIR/bool.rs:14:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 eebb74fff471c..de77cfc78aa89 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 similarity index 94% rename from tests/ui/transmutability/primitives/numbers.stderr rename to tests/ui/transmutability/primitives/numbers.current.stderr index c04a0e82aa283..bbf1f1669995e 100644 --- a/tests/ui/transmutability/primitives/numbers.stderr +++ b/tests/ui/transmutability/primitives/numbers.current.stderr @@ -1,12 +1,12 @@ error[E0277]: `i8` cannot be safely transmuted into `i16` in the defining scope of `assert::Context`. - --> $DIR/numbers.rs:62:40 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -15,14 +15,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -31,14 +31,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -47,14 +47,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -63,14 +63,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -79,14 +79,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -95,14 +95,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -111,14 +111,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -127,14 +127,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -143,14 +143,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -159,14 +159,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -175,14 +175,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -191,14 +191,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -207,14 +207,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -223,14 +223,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -239,14 +239,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -255,14 +255,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -271,14 +271,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -287,14 +287,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -303,14 +303,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -319,14 +319,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -335,14 +335,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -351,14 +351,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -367,14 +367,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -383,14 +383,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -399,14 +399,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -415,14 +415,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -431,14 +431,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -447,14 +447,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -463,14 +463,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -479,14 +479,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -495,14 +495,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -511,14 +511,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -527,14 +527,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -543,14 +543,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -559,14 +559,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -575,14 +575,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -591,14 +591,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -607,14 +607,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -623,14 +623,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -639,14 +639,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -655,14 +655,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -671,14 +671,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -687,14 +687,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -703,14 +703,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -719,14 +719,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -735,14 +735,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -751,14 +751,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -767,14 +767,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -783,14 +783,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -799,14 +799,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -815,14 +815,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -831,14 +831,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -847,14 +847,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -863,14 +863,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -879,14 +879,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- required by a bound in this function @@ -895,14 +895,14 @@ LL | Dst: BikeshedIntrinsicFrom | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 + --> $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`. | = help: the trait `BikeshedIntrinsicFrom` 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() | --------------- 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 0000000000000..bbf1f1669995e --- /dev/null +++ b/tests/ui/transmutability/primitives/numbers.next.stderr @@ -0,0 +1,915 @@ +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`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `i16` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^ `i8` cannot be safely transmuted into `u16` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u16` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^ `i8` cannot be safely transmuted into `i32` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `i32` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^ `i8` cannot be safely transmuted into `f32` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `f32` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^ `i8` cannot be safely transmuted into `u32` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u32` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^ `i8` cannot be safely transmuted into `u64` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u64` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^ `i8` cannot be safely transmuted into `i64` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `i64` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^ `i8` cannot be safely transmuted into `f64` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `f64` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^^ `i8` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u128` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^^ `i8` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `i128` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^ `u8` cannot be safely transmuted into `i16` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `i16` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^ `u8` cannot be safely transmuted into `u16` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u16` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^ `u8` cannot be safely transmuted into `i32` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `i32` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^ `u8` cannot be safely transmuted into `f32` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `f32` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^ `u8` cannot be safely transmuted into `u32` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u32` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^ `u8` cannot be safely transmuted into `u64` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u64` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^ `u8` cannot be safely transmuted into `i64` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `i64` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^ `u8` cannot be safely transmuted into `f64` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `f64` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^^ `u8` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u128` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^^ `u8` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `i128` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^ `i16` cannot be safely transmuted into `i32` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `i32` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^ `i16` cannot be safely transmuted into `f32` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `f32` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^ `i16` cannot be safely transmuted into `u32` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u32` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^ `i16` cannot be safely transmuted into `u64` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u64` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^ `i16` cannot be safely transmuted into `i64` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `i64` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^ `i16` cannot be safely transmuted into `f64` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `f64` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^^ `i16` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u128` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^^ `i16` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `i128` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^ `u16` cannot be safely transmuted into `i32` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `i32` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^ `u16` cannot be safely transmuted into `f32` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `f32` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^ `u16` cannot be safely transmuted into `u32` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u32` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^ `u16` cannot be safely transmuted into `u64` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u64` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^ `u16` cannot be safely transmuted into `i64` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `i64` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^ `u16` cannot be safely transmuted into `f64` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `f64` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^^ `u16` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u128` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^^ `u16` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `i128` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^ `i32` cannot be safely transmuted into `u64` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u64` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^ `i32` cannot be safely transmuted into `i64` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `i64` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^ `i32` cannot be safely transmuted into `f64` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `f64` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^^ `i32` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u128` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^^ `i32` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `i128` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^ `f32` cannot be safely transmuted into `u64` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u64` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^ `f32` cannot be safely transmuted into `i64` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `i64` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^ `f32` cannot be safely transmuted into `f64` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `f64` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^^ `f32` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u128` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^^ `f32` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `i128` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^ `u32` cannot be safely transmuted into `u64` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u64` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^ `u32` cannot be safely transmuted into `i64` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `i64` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^ `u32` cannot be safely transmuted into `f64` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `f64` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^^ `u32` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u128` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^^ `u32` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `i128` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^^ `u64` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u128` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^^ `u64` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `i128` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^^ `i64` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u128` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^^ `i64` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `i128` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^^ `f64` cannot be safely transmuted into `u128` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `u128` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>(); + | ^^^^ `f64` cannot be safely transmuted into `i128` in the defining scope of `assert::Context`. + | + = help: the trait `BikeshedIntrinsicFrom` is not implemented for `i128` +note: required by a bound in `is_transmutable` + --> $DIR/numbers.rs:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 0df43d2045f72..e980e91ed06a6 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 similarity index 95% rename from tests/ui/transmutability/primitives/unit.stderr rename to tests/ui/transmutability/primitives/unit.current.stderr index 988cd33b3bf7b..c20355e16f5f4 100644 --- a/tests/ui/transmutability/primitives/unit.stderr +++ b/tests/ui/transmutability/primitives/unit.current.stderr @@ -1,12 +1,12 @@ error[E0277]: `()` cannot be safely transmuted into `u8` in the defining scope of `should_have_correct_size::Context`. - --> $DIR/unit.rs:28:35 + --> $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`. | = 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() | --------------- 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 0000000000000..c20355e16f5f4 --- /dev/null +++ b/tests/ui/transmutability/primitives/unit.next.stderr @@ -0,0 +1,25 @@ +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`. + | + = 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:15:14 + | +LL | pub fn is_transmutable() + | --------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | |__________^ 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 1975a61de9882..12eac175106e6 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 similarity index 95% rename from tests/ui/transmutability/references.stderr rename to tests/ui/transmutability/references.current.stderr index eb3bd03fd3169..39d42cc4fa6c8 100644 --- a/tests/ui/transmutability/references.stderr +++ b/tests/ui/transmutability/references.current.stderr @@ -1,12 +1,12 @@ error[E0277]: `&'static Unit` cannot be safely transmuted into `&'static Unit` in the defining scope of `assert::Context`. - --> $DIR/references.rs:26:52 + --> $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`. | = 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() | --------------------- 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 0000000000000..39d42cc4fa6c8 --- /dev/null +++ b/tests/ui/transmutability/references.next.stderr @@ -0,0 +1,26 @@ +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`. + | + = 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:16:14 + | +LL | pub fn is_maybe_transmutable() + | --------------------- required by a bound in this function +LL | where +LL | Dst: BikeshedIntrinsicFrom + | |__________^ 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 af3ff0ec1d205..8c2b25ebba1e3 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"]