Files
rust/tests/ui/impl-trait/coherence-treats-tait-ambig.rs
2025-03-11 12:05:02 +00:00

18 lines
282 B
Rust

#![feature(type_alias_impl_trait)]
type T = impl Sized;
struct Foo;
impl Into<T> for Foo {
//~^ ERROR conflicting implementations of trait `Into<_>` for type `Foo`
#[define_opaque(T)]
fn into(self) -> T {
Foo
}
}
fn main() {
let _: T = Foo.into();
}