]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/inverted-parameters.rs
Rollup merge of #67005 - andrewbanchich:master, r=joshtriplett
[rust.git] / src / test / ui / parser / inverted-parameters.rs
1 struct S;
2
3 impl S {
4     fn foo(&self, &str bar) {}
5     //~^ ERROR expected one of `:`, `@`
6     //~| HELP declare the type after the parameter binding
7     //~| SUGGESTION <identifier>: <type>
8 }
9
10 fn baz(S quux, xyzzy: i32) {}
11 //~^ ERROR expected one of `:`, `@`
12 //~| HELP declare the type after the parameter binding
13 //~| SUGGESTION <identifier>: <type>
14
15 fn one(i32 a b) {}
16 //~^ ERROR expected one of `:`, `@`
17
18 fn pattern((i32, i32) (a, b)) {}
19 //~^ ERROR expected one of `:`
20
21 fn fizz(i32) {}
22 //~^ ERROR expected one of `:`, `@`
23 //~| HELP if this was a parameter name, give it a type
24 //~| HELP if this is a type, explicitly ignore the parameter name
25
26 fn missing_colon(quux S) {}
27 //~^ ERROR expected one of `:`, `@`
28 //~| HELP declare the type after the parameter binding
29 //~| SUGGESTION <identifier>: <type>
30
31 fn main() {}