]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/inverted-parameters.rs
Auto merge of #51285 - Mark-Simulacrum:remove-quote_apis, r=Manishearth
[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 `:` or `@`
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 `:` or `@`
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 `:` or `@`
17
18 fn pattern((i32, i32) (a, b)) {}
19 //~^ ERROR expected `:`
20
21 fn fizz(i32) {}
22 //~^ ERROR expected one of `:` or `@`
23
24 fn missing_colon(quux S) {}
25 //~^ ERROR expected one of `:` or `@`
26 //~| HELP declare the type after the parameter binding
27 //~| SUGGESTION <identifier>: <type>
28
29 fn main() {}