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