]> git.lizzy.rs Git - rust.git/blob - src/test/ui/did_you_mean/bad-assoc-ty.rs
Remove licenses
[rust.git] / src / test / ui / did_you_mean / bad-assoc-ty.rs
1 type A = [u8; 4]::AssocTy;
2 //~^ ERROR missing angle brackets in associated item path
3 //~| ERROR ambiguous associated type
4
5 type B = [u8]::AssocTy;
6 //~^ ERROR missing angle brackets in associated item path
7 //~| ERROR ambiguous associated type
8
9 type C = (u8)::AssocTy;
10 //~^ ERROR missing angle brackets in associated item path
11 //~| ERROR ambiguous associated type
12
13 type D = (u8, u8)::AssocTy;
14 //~^ ERROR missing angle brackets in associated item path
15 //~| ERROR ambiguous associated type
16
17 type E = _::AssocTy;
18 //~^ ERROR missing angle brackets in associated item path
19 //~| ERROR the type placeholder `_` is not allowed within types on item signatures
20
21 type F = &'static (u8)::AssocTy;
22 //~^ ERROR missing angle brackets in associated item path
23 //~| ERROR ambiguous associated type
24
25 // Qualified paths cannot appear in bounds, so the recovery
26 // should apply to the whole sum and not `(Send)`.
27 type G = 'static + (Send)::AssocTy;
28 //~^ ERROR missing angle brackets in associated item path
29 //~| ERROR ambiguous associated type
30
31 // This is actually a legal path with fn-like generic arguments in the middle!
32 // Recovery should not apply in this context.
33 type H = Fn(u8) -> (u8)::Output;
34 //~^ ERROR ambiguous associated type
35
36 fn main() {}