2018-10-04 02:21:05 +00:00
|
|
|
struct S;
|
|
|
|
|
|
|
|
impl S {
|
|
|
|
fn foo(&self, &str bar) {}
|
2019-08-25 02:39:28 +00:00
|
|
|
//~^ ERROR expected one of `:`, `@`
|
2018-10-04 02:21:05 +00:00
|
|
|
//~| HELP declare the type after the parameter binding
|
|
|
|
//~| SUGGESTION <identifier>: <type>
|
|
|
|
}
|
|
|
|
|
|
|
|
fn baz(S quux, xyzzy: i32) {}
|
2019-08-25 02:39:28 +00:00
|
|
|
//~^ ERROR expected one of `:`, `@`
|
2018-10-04 02:21:05 +00:00
|
|
|
//~| HELP declare the type after the parameter binding
|
|
|
|
//~| SUGGESTION <identifier>: <type>
|
|
|
|
|
|
|
|
fn one(i32 a b) {}
|
2019-08-25 02:39:28 +00:00
|
|
|
//~^ ERROR expected one of `:`, `@`
|
2018-10-04 02:21:05 +00:00
|
|
|
|
|
|
|
fn pattern((i32, i32) (a, b)) {}
|
2019-08-25 02:39:28 +00:00
|
|
|
//~^ ERROR expected one of `:`
|
2018-10-04 02:21:05 +00:00
|
|
|
|
|
|
|
fn fizz(i32) {}
|
2019-08-25 02:39:28 +00:00
|
|
|
//~^ ERROR expected one of `:`, `@`
|
2020-06-28 03:55:42 +00:00
|
|
|
//~| HELP if this is a parameter name, give it a type
|
2020-02-02 10:10:27 +00:00
|
|
|
//~| HELP if this is a `self` type, give it a parameter name
|
2019-05-29 22:25:46 +00:00
|
|
|
//~| HELP if this is a type, explicitly ignore the parameter name
|
2018-10-04 02:21:05 +00:00
|
|
|
|
|
|
|
fn missing_colon(quux S) {}
|
2019-08-25 02:39:28 +00:00
|
|
|
//~^ ERROR expected one of `:`, `@`
|
2018-10-04 02:21:05 +00:00
|
|
|
//~| HELP declare the type after the parameter binding
|
|
|
|
//~| SUGGESTION <identifier>: <type>
|
|
|
|
|
|
|
|
fn main() {}
|