rust/src/test/ui/span/issue-34264.stderr

85 lines
2.5 KiB
Plaintext
Raw Normal View History

error: expected one of `:`, `@`, or `|`, found `<`
2018-12-25 09:56:47 -06:00
--> $DIR/issue-34264.rs:1:14
|
2019-03-09 06:03:44 -06:00
LL | fn foo(Option<i32>, String) {}
| ^ expected one of `:`, `@`, or `|`
|
= note: anonymous parameters are removed in the 2018 edition (see RFC 1685)
help: if this is a `self` type, give it a parameter name
|
LL | fn foo(self: Option<i32>, String) {}
| ^^^^^^^^^^^^
help: if this is a type, explicitly ignore the parameter name
|
LL | fn foo(_: Option<i32>, String) {}
| ^^^^^^^^^
error: expected one of `:`, `@`, or `|`, found `)`
2018-12-25 09:56:47 -06:00
--> $DIR/issue-34264.rs:1:27
|
2019-03-09 06:03:44 -06:00
LL | fn foo(Option<i32>, String) {}
| ^ expected one of `:`, `@`, or `|`
|
= note: anonymous parameters are removed in the 2018 edition (see RFC 1685)
help: if this is a parameter name, give it a type
|
LL | fn foo(Option<i32>, String: TypeName) {}
| ^^^^^^^^^^^^^^^^
help: if this is a type, explicitly ignore the parameter name
|
LL | fn foo(Option<i32>, _: String) {}
| ^^^^^^^^^
error: expected one of `:`, `@`, or `|`, found `,`
2018-12-25 09:56:47 -06:00
--> $DIR/issue-34264.rs:3:9
|
2019-03-09 06:03:44 -06:00
LL | fn bar(x, y: usize) {}
| ^ expected one of `:`, `@`, or `|`
|
= note: anonymous parameters are removed in the 2018 edition (see RFC 1685)
help: if this is a `self` type, give it a parameter name
|
LL | fn bar(self: x, y: usize) {}
| ^^^^^^^
help: if this is a parameter name, give it a type
|
LL | fn bar(x: TypeName, y: usize) {}
| ^^^^^^^^^^^
help: if this is a type, explicitly ignore the parameter name
|
LL | fn bar(_: x, y: usize) {}
| ^^^^
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
|
2019-03-09 06:03:44 -06:00
LL | fn foo(Option<i32>, String) {}
| --------------------------- defined here
...
2019-03-09 06:03:44 -06:00
LL | foo(Some(42), 2, "");
| ^^^ -------- - -- supplied 3 arguments
| |
| expected 2 arguments
error[E0308]: mismatched types
2018-12-25 09:56:47 -06:00
--> $DIR/issue-34264.rs:8:13
|
2019-03-09 06:03:44 -06:00
LL | bar("", "");
| ^^ expected `usize`, found `&str`
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
|
2019-03-09 06:03:44 -06:00
LL | fn bar(x, y: usize) {}
| ------------------- defined here
...
2019-03-09 06:03:44 -06:00
LL | bar(1, 2, 3);
| ^^^ - - - supplied 3 arguments
| |
| expected 2 arguments
error: aborting due to 6 previous errors
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`.