mirror of https://github.com/rust-lang/rust
18 lines
370 B
Rust
18 lines
370 B
Rust
trait Ambiguous<A> {
|
|
fn method() {}
|
|
}
|
|
|
|
struct One;
|
|
struct Two;
|
|
struct Struct;
|
|
|
|
impl Ambiguous<One> for Struct {}
|
|
//~^ NOTE multiple `impl`s satisfying `Struct: Ambiguous<_>` found
|
|
impl Ambiguous<Two> for Struct {}
|
|
|
|
fn main() {
|
|
<Struct as Ambiguous<_>>::method();
|
|
//~^ ERROR type annotations needed
|
|
//~| NOTE cannot infer type of the type parameter `A`
|
|
}
|