2019-08-24 21:39:28 -05:00
|
|
|
error: expected one of `:`, `@`, or `|`, found `<`
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/issue-34264.rs:1:14
|
2017-03-28 20:56:29 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | fn foo(Option<i32>, String) {}
|
2019-10-28 13:08:53 -05:00
|
|
|
| ^ expected one of `:`, `@`, or `|`
|
2019-10-01 09:17:50 -05:00
|
|
|
|
|
|
|
|
= note: anonymous parameters are removed in the 2018 edition (see RFC 1685)
|
2020-02-02 04:10:27 -06:00
|
|
|
help: if this is a `self` type, give it a parameter name
|
|
|
|
|
|
|
|
|
LL | fn foo(self: Option<i32>, String) {}
|
|
|
|
| ^^^^^^^^^^^^
|
2019-10-01 09:17:50 -05:00
|
|
|
help: if this is a type, explicitly ignore the parameter name
|
|
|
|
|
|
|
|
|
LL | fn foo(_: Option<i32>, String) {}
|
|
|
|
| ^^^^^^^^^
|
2017-03-28 20:56:29 -05:00
|
|
|
|
2019-08-24 21:39:28 -05:00
|
|
|
error: expected one of `:`, `@`, or `|`, found `)`
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/issue-34264.rs:1:27
|
2017-03-28 20:56:29 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | fn foo(Option<i32>, String) {}
|
2019-10-28 13:08:53 -05:00
|
|
|
| ^ expected one of `:`, `@`, or `|`
|
2019-05-29 17:25:46 -05:00
|
|
|
|
|
|
|
|
= note: anonymous parameters are removed in the 2018 edition (see RFC 1685)
|
2020-06-27 22:55:42 -05:00
|
|
|
help: if this is a parameter name, give it a type
|
2019-05-29 17:25:46 -05:00
|
|
|
|
|
|
|
|
LL | fn foo(Option<i32>, String: TypeName) {}
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
help: if this is a type, explicitly ignore the parameter name
|
|
|
|
|
|
|
|
|
LL | fn foo(Option<i32>, _: String) {}
|
|
|
|
| ^^^^^^^^^
|
2017-03-28 20:56:29 -05:00
|
|
|
|
2019-08-24 21:39:28 -05:00
|
|
|
error: expected one of `:`, `@`, or `|`, found `,`
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/issue-34264.rs:3:9
|
2017-03-28 20:56:29 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | fn bar(x, y: usize) {}
|
2019-10-28 13:08:53 -05:00
|
|
|
| ^ expected one of `:`, `@`, or `|`
|
2019-05-29 17:25:46 -05:00
|
|
|
|
|
|
|
|
= note: anonymous parameters are removed in the 2018 edition (see RFC 1685)
|
2020-02-02 04:10:27 -06:00
|
|
|
help: if this is a `self` type, give it a parameter name
|
|
|
|
|
|
|
|
|
LL | fn bar(self: x, y: usize) {}
|
|
|
|
| ^^^^^^^
|
2020-06-27 22:55:42 -05:00
|
|
|
help: if this is a parameter name, give it a type
|
2019-05-29 17:25:46 -05:00
|
|
|
|
|
|
|
|
LL | fn bar(x: TypeName, y: usize) {}
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
help: if this is a type, explicitly ignore the parameter name
|
|
|
|
|
|
|
|
|
LL | fn bar(_: x, y: usize) {}
|
|
|
|
| ^^^^
|
2017-03-28 20:56:29 -05:00
|
|
|
|
2020-02-05 23:08:07 -06:00
|
|
|
error[E0061]: this function takes 2 arguments but 3 arguments were supplied
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/issue-34264.rs:7:5
|
2017-03-28 20:56:29 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | fn foo(Option<i32>, String) {}
|
2017-12-10 13:12:17 -06:00
|
|
|
| --------------------------- defined here
|
2017-03-28 20:56:29 -05:00
|
|
|
...
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | foo(Some(42), 2, "");
|
2020-02-05 23:08:07 -06:00
|
|
|
| ^^^ -------- - -- supplied 3 arguments
|
|
|
|
| |
|
|
|
|
| expected 2 arguments
|
2017-03-28 20:56:29 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/issue-34264.rs:8:13
|
2017-03-28 20:56:29 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | bar("", "");
|
2019-11-15 11:37:01 -06:00
|
|
|
| ^^ expected `usize`, found `&str`
|
2017-03-28 20:56:29 -05:00
|
|
|
|
2020-02-05 23:08:07 -06:00
|
|
|
error[E0061]: this function takes 2 arguments but 3 arguments were supplied
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/issue-34264.rs:10:5
|
2017-03-28 20:56:29 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | fn bar(x, y: usize) {}
|
2017-12-10 13:12:17 -06:00
|
|
|
| ------------------- defined here
|
2017-03-28 20:56:29 -05:00
|
|
|
...
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | bar(1, 2, 3);
|
2020-02-05 23:08:07 -06:00
|
|
|
| ^^^ - - - supplied 3 arguments
|
|
|
|
| |
|
|
|
|
| expected 2 arguments
|
2017-03-28 20:56:29 -05:00
|
|
|
|
2017-07-02 08:09:09 -05:00
|
|
|
error: aborting due to 6 previous errors
|
2017-03-28 20:56:29 -05:00
|
|
|
|
2019-04-17 12:26:38 -05:00
|
|
|
Some errors have detailed explanations: E0061, E0308.
|
2018-03-03 08:59:40 -06:00
|
|
|
For more information about an error, try `rustc --explain E0061`.
|