summaryrefslogtreecommitdiffstats
path: root/tests/ui/impl-trait/coherence-treats-tait-ambig.rs
blob: 156a7eb0e23d7e02f057f80e2df69dbac7098800 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// revisions: current next
//[next] compile-flags: -Ztrait-solver=next

#![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();
}