summaryrefslogtreecommitdiffstats
path: root/tests/ui/traits/not-suggest-non-existing-fully-qualified-path.rs
blob: 538e74ee1b00f20587147e093997dd7ab1fe27e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
struct A<T>(T);
struct B;

trait I<T> {}
impl I<i32> for B {}
impl I<u32> for B {}

trait V<U> {
    fn method(self) -> U;
}

impl<T, U> V<U> for A<T>
where
    T: I<U>,
{
    fn method(self) -> U { unimplemented!() }
}

fn main() {
    let a = A(B);
    a.method();
    //~^ ERROR type annotations needed
    //~| ERROR type annotations needed
}