summaryrefslogtreecommitdiffstats
path: root/tests/ui/error-codes/E0221.rs
blob: 7c7e139a0989dd200dfdb33379b125e08a2ed05c (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
25
26
27
trait T1 {}
trait T2 {}

trait Foo {
    type A: T1;
}

trait Bar : Foo {
    type A: T2;
    fn do_something() {
        let _: Self::A;
        //~^ ERROR E0221
    }
}

trait T3 {}

trait My : std::str::FromStr {
    type Err: T3;
    fn test() {
        let _: Self::Err;
        //~^ ERROR E0221
    }
}

fn main() {
}