diff --git a/src/test/ui/transmutability/issues-101739.rs b/src/test/ui/transmutability/issues-101739.rs new file mode 100644 index 0000000000000..bcb8b158edfc5 --- /dev/null +++ b/src/test/ui/transmutability/issues-101739.rs @@ -0,0 +1,21 @@ +#![feature(transmutability)] + +mod assert { + use std::mem::BikeshedIntrinsicFrom; + + pub fn is_transmutable() + where + Dst: BikeshedIntrinsicFrom, //~ ERROR cannot find type `Dst` in this scope + //~^ ERROR mismatched types + { + } +} + +fn via_const() { + struct Context; + struct Src; + + assert::is_transmutable::(); +} + +fn main() {} diff --git a/src/test/ui/transmutability/issues-101739.stderr b/src/test/ui/transmutability/issues-101739.stderr new file mode 100644 index 0000000000000..502c9751b54f3 --- /dev/null +++ b/src/test/ui/transmutability/issues-101739.stderr @@ -0,0 +1,16 @@ +error[E0412]: cannot find type `Dst` in this scope + --> $DIR/issues-101739.rs:8:9 + | +LL | Dst: BikeshedIntrinsicFrom, + | ^^^ not found in this scope + +error[E0308]: mismatched types + --> $DIR/issues-101739.rs:8:50 + | +LL | Dst: BikeshedIntrinsicFrom, + | ^^^^^^^^^^^^^^^^ expected struct `Assume`, found `bool` + +error: aborting due to 2 previous errors + +Some errors have detailed explanations: E0308, E0412. +For more information about an error, try `rustc --explain E0308`.