]> git.lizzy.rs Git - rust.git/blob - src/test/ui/span/issue-34264.stderr
Use verbose help for deprecation suggestion
[rust.git] / src / test / ui / span / issue-34264.stderr
1 error: expected one of `:`, `@`, or `|`, found `<`
2   --> $DIR/issue-34264.rs:1:14
3    |
4 LL | fn foo(Option<i32>, String) {}
5    |              ^ expected one of `:`, `@`, or `|`
6    |
7    = note: anonymous parameters are removed in the 2018 edition (see RFC 1685)
8 help: if this is a `self` type, give it a parameter name
9    |
10 LL | fn foo(self: Option<i32>, String) {}
11    |        +++++
12 help: if this is a type, explicitly ignore the parameter name
13    |
14 LL | fn foo(_: Option<i32>, String) {}
15    |        ++
16
17 error: expected one of `:`, `@`, or `|`, found `)`
18   --> $DIR/issue-34264.rs:1:27
19    |
20 LL | fn foo(Option<i32>, String) {}
21    |                           ^ expected one of `:`, `@`, or `|`
22    |
23    = note: anonymous parameters are removed in the 2018 edition (see RFC 1685)
24 help: if this is a parameter name, give it a type
25    |
26 LL | fn foo(Option<i32>, String: TypeName) {}
27    |                           ++++++++++
28 help: if this is a type, explicitly ignore the parameter name
29    |
30 LL | fn foo(Option<i32>, _: String) {}
31    |                     ++
32
33 error: expected one of `:`, `@`, or `|`, found `,`
34   --> $DIR/issue-34264.rs:3:9
35    |
36 LL | fn bar(x, y: usize) {}
37    |         ^ expected one of `:`, `@`, or `|`
38    |
39    = note: anonymous parameters are removed in the 2018 edition (see RFC 1685)
40 help: if this is a `self` type, give it a parameter name
41    |
42 LL | fn bar(self: x, y: usize) {}
43    |        +++++
44 help: if this is a parameter name, give it a type
45    |
46 LL | fn bar(x: TypeName, y: usize) {}
47    |         ++++++++++
48 help: if this is a type, explicitly ignore the parameter name
49    |
50 LL | fn bar(_: x, y: usize) {}
51    |        ++
52
53 error[E0061]: this function takes 2 arguments but 3 arguments were supplied
54   --> $DIR/issue-34264.rs:7:5
55    |
56 LL |     foo(Some(42), 2, "");
57    |     ^^^              -- argument unexpected
58    |
59 note: function defined here
60   --> $DIR/issue-34264.rs:1:4
61    |
62 LL | fn foo(Option<i32>, String) {}
63    |    ^^^ -----------  ------
64 help: remove the extra argument
65    |
66 LL |     foo(Some(42), 2);
67    |     ~~~~~~~~~~~~~~~~
68
69 error[E0308]: mismatched types
70   --> $DIR/issue-34264.rs:8:13
71    |
72 LL |     bar("", "");
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) {}
81    |    ^^^ -  --------
82
83 error[E0061]: this function takes 2 arguments but 3 arguments were supplied
84   --> $DIR/issue-34264.rs:10:5
85    |
86 LL |     bar(1, 2, 3);
87    |     ^^^       - argument unexpected
88    |
89 note: function defined here
90   --> $DIR/issue-34264.rs:3:4
91    |
92 LL | fn bar(x, y: usize) {}
93    |    ^^^ -  --------
94 help: remove the extra argument
95    |
96 LL |     bar(1, 2);
97    |     ~~~~~~~~~
98
99 error: aborting due to 6 previous errors
100
101 Some errors have detailed explanations: E0061, E0308.
102 For more information about an error, try `rustc --explain E0061`.