]> git.proxmox.com Git - rustc.git/blame - src/test/ui/span/issue-34264.stderr
New upstream version 1.65.0+dfsg1
[rustc.git] / src / test / ui / span / issue-34264.stderr
CommitLineData
e1599b0c 1error: expected one of `:`, `@`, or `|`, found `<`
0731742a 2 --> $DIR/issue-34264.rs:1:14
cc61c64b 3 |
532ac7d7 4LL | fn foo(Option<i32>, String) {}
60c5eb7d 5 | ^ expected one of `:`, `@`, or `|`
e74abb32
XL
6 |
7 = note: anonymous parameters are removed in the 2018 edition (see RFC 1685)
74b04a01
XL
8help: if this is a `self` type, give it a parameter name
9 |
10LL | fn foo(self: Option<i32>, String) {}
c295e0f8 11 | +++++
e74abb32
XL
12help: if this is a type, explicitly ignore the parameter name
13 |
14LL | fn foo(_: Option<i32>, String) {}
c295e0f8 15 | ++
cc61c64b 16
e1599b0c 17error: expected one of `:`, `@`, or `|`, found `)`
0731742a 18 --> $DIR/issue-34264.rs:1:27
cc61c64b 19 |
532ac7d7 20LL | fn foo(Option<i32>, String) {}
60c5eb7d 21 | ^ expected one of `:`, `@`, or `|`
dc9dc135
XL
22 |
23 = note: anonymous parameters are removed in the 2018 edition (see RFC 1685)
f035d41b 24help: if this is a parameter name, give it a type
dc9dc135
XL
25 |
26LL | fn foo(Option<i32>, String: TypeName) {}
c295e0f8 27 | ++++++++++
dc9dc135
XL
28help: if this is a type, explicitly ignore the parameter name
29 |
30LL | fn foo(Option<i32>, _: String) {}
c295e0f8 31 | ++
cc61c64b 32
e1599b0c 33error: expected one of `:`, `@`, or `|`, found `,`
0731742a 34 --> $DIR/issue-34264.rs:3:9
cc61c64b 35 |
532ac7d7 36LL | fn bar(x, y: usize) {}
60c5eb7d 37 | ^ expected one of `:`, `@`, or `|`
dc9dc135
XL
38 |
39 = note: anonymous parameters are removed in the 2018 edition (see RFC 1685)
74b04a01
XL
40help: if this is a `self` type, give it a parameter name
41 |
42LL | fn bar(self: x, y: usize) {}
c295e0f8 43 | +++++
f035d41b 44help: if this is a parameter name, give it a type
dc9dc135
XL
45 |
46LL | fn bar(x: TypeName, y: usize) {}
c295e0f8 47 | ++++++++++
dc9dc135
XL
48help: if this is a type, explicitly ignore the parameter name
49 |
50LL | fn bar(_: x, y: usize) {}
c295e0f8 51 | ++
cc61c64b 52
74b04a01 53error[E0061]: this function takes 2 arguments but 3 arguments were supplied
0731742a 54 --> $DIR/issue-34264.rs:7:5
cc61c64b 55 |
532ac7d7 56LL | foo(Some(42), 2, "");
064997fb 57 | ^^^ -- argument of type `&'static str` unexpected
29967ef6
XL
58 |
59note: function defined here
60 --> $DIR/issue-34264.rs:1:4
61 |
62LL | fn foo(Option<i32>, String) {}
63 | ^^^ ----------- ------
923072b8
FG
64help: remove the extra argument
65 |
66LL | foo(Some(42), 2);
f2b60f7d 67 | ~~~~~~~~~~~~~
cc61c64b
XL
68
69error[E0308]: mismatched types
0731742a 70 --> $DIR/issue-34264.rs:8:13
cc61c64b 71 |
532ac7d7 72LL | bar("", "");
923072b8
FG
73 | --- ^^ expected `usize`, found `&str`
74 | |
75 | arguments to this function are incorrect
76 |
77note: function defined here
78 --> $DIR/issue-34264.rs:3:4
79 |
80LL | fn bar(x, y: usize) {}
f2b60f7d 81 | ^^^ --------
cc61c64b 82
74b04a01 83error[E0061]: this function takes 2 arguments but 3 arguments were supplied
0731742a 84 --> $DIR/issue-34264.rs:10:5
cc61c64b 85 |
532ac7d7 86LL | bar(1, 2, 3);
064997fb 87 | ^^^ - argument of type `{integer}` unexpected
29967ef6
XL
88 |
89note: function defined here
90 --> $DIR/issue-34264.rs:3:4
91 |
92LL | fn bar(x, y: usize) {}
93 | ^^^ - --------
923072b8
FG
94help: remove the extra argument
95 |
96LL | bar(1, 2);
f2b60f7d 97 | ~~~~~~
cc61c64b 98
041b39d2 99error: aborting due to 6 previous errors
cc61c64b 100
48663c56 101Some errors have detailed explanations: E0061, E0308.
0531ce1d 102For more information about an error, try `rustc --explain E0061`.