]> git.lizzy.rs Git - rust.git/blob - src/test/ui/span/issue-34264.stderr
a9cf323c990576c76f591e4e93c4b7b6964fcd7c
[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 type, explicitly ignore the parameter name
9    |
10 LL | fn foo(_: Option<i32>, String) {}
11    |        ^^^^^^^^^
12
13 error: expected one of `:`, `@`, or `|`, found `)`
14   --> $DIR/issue-34264.rs:1:27
15    |
16 LL | fn foo(Option<i32>, String) {}
17    |                           ^ expected one of `:`, `@`, or `|`
18    |
19    = note: anonymous parameters are removed in the 2018 edition (see RFC 1685)
20 help: if this was a parameter name, give it a type
21    |
22 LL | fn foo(Option<i32>, String: TypeName) {}
23    |                     ^^^^^^^^^^^^^^^^
24 help: if this is a type, explicitly ignore the parameter name
25    |
26 LL | fn foo(Option<i32>, _: String) {}
27    |                     ^^^^^^^^^
28
29 error: expected one of `:`, `@`, or `|`, found `,`
30   --> $DIR/issue-34264.rs:3:9
31    |
32 LL | fn bar(x, y: usize) {}
33    |         ^ expected one of `:`, `@`, or `|`
34    |
35    = note: anonymous parameters are removed in the 2018 edition (see RFC 1685)
36 help: if this was a parameter name, give it a type
37    |
38 LL | fn bar(x: TypeName, y: usize) {}
39    |        ^^^^^^^^^^^
40 help: if this is a type, explicitly ignore the parameter name
41    |
42 LL | fn bar(_: x, y: usize) {}
43    |        ^^^^
44
45 error[E0061]: this function takes 2 parameters but 3 parameters were supplied
46   --> $DIR/issue-34264.rs:7:5
47    |
48 LL | fn foo(Option<i32>, String) {}
49    | --------------------------- defined here
50 ...
51 LL |     foo(Some(42), 2, "");
52    |     ^^^^^^^^^^^^^^^^^^^^ expected 2 parameters
53
54 error[E0308]: mismatched types
55   --> $DIR/issue-34264.rs:8:13
56    |
57 LL |     bar("", "");
58    |             ^^ expected usize, found reference
59    |
60    = note:   expected type `usize`
61            found reference `&'static str`
62
63 error[E0061]: this function takes 2 parameters but 3 parameters were supplied
64   --> $DIR/issue-34264.rs:10:5
65    |
66 LL | fn bar(x, y: usize) {}
67    | ------------------- defined here
68 ...
69 LL |     bar(1, 2, 3);
70    |     ^^^^^^^^^^^^ expected 2 parameters
71
72 error: aborting due to 6 previous errors
73
74 Some errors have detailed explanations: E0061, E0308.
75 For more information about an error, try `rustc --explain E0061`.