rust/tests/ui/impl-trait/coherence-treats-tait-ambig.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
254 B
Rust
Raw Normal View History

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