1 // Another example from issue #84660, this time weaponized as a safe transmute: an opaque type in an
2 // impl header being accepted was used to create unsoundness.
4 #![feature(type_alias_impl_trait)]
9 fn _defining_use() -> Bar {}
13 fn convert(i: In) -> Self::Out;
16 impl<In, Out> Trait<Bar, In> for Out {
18 fn convert(_i: In) -> Self::Out {
23 impl<In, Out> Trait<(), In> for Out { //~ ERROR conflicting implementations of trait `Trait<Bar, _>`
25 fn convert(i: In) -> Self::Out {
30 fn transmute<In, Out>(i: In) -> Out {
31 <Out as Trait<Bar, In>>::convert(i)
37 let x = "Hello World".to_string();
38 d = transmute::<&String, &String>(&x);