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