]> git.proxmox.com Git - rustc.git/blob - src/test/ui/self/self-impl.rs
Update unsuspicious file list
[rustc.git] / src / test / ui / self / self-impl.rs
1 // Test that unsupported uses of `Self` in impls don't crash
2
3 struct Bar;
4
5 trait Foo {
6 type Baz;
7 }
8
9 trait SuperFoo {
10 type SuperBaz;
11 }
12
13 impl Foo for Bar {
14 type Baz = bool;
15 }
16
17 impl SuperFoo for Bar {
18 type SuperBaz = bool;
19 }
20
21 impl Bar {
22 fn f() {
23 let _: <Self>::Baz = true;
24 //~^ ERROR ambiguous associated type
25 let _: Self::Baz = true;
26 //~^ ERROR ambiguous associated type
27 }
28 }
29
30 fn main() {}