]> git.proxmox.com Git - rustc.git/blob - src/test/ui/did_you_mean/bad-assoc-pat.rs
New upstream version 1.33.0+dfsg1
[rustc.git] / src / test / ui / did_you_mean / bad-assoc-pat.rs
1 fn main() {
2 match 0u8 {
3 [u8]::AssocItem => {}
4 //~^ ERROR missing angle brackets in associated item path
5 //~| ERROR no associated item named `AssocItem` found for type `[u8]` in the current scope
6 (u8, u8)::AssocItem => {}
7 //~^ ERROR missing angle brackets in associated item path
8 //~| ERROR no associated item named `AssocItem` found for type `(u8, u8)` in the current sco
9 _::AssocItem => {}
10 //~^ ERROR missing angle brackets in associated item path
11 //~| ERROR no associated item named `AssocItem` found for type `_` in the current scope
12 }
13 match &0u8 {
14 &(u8,)::AssocItem => {}
15 //~^ ERROR missing angle brackets in associated item path
16 //~| ERROR no associated item named `AssocItem` found for type `(u8,)` in the current scope
17 }
18 }