]> git.lizzy.rs Git - rust.git/blob - src/test/ui/anon-params/anon-params-denied-2018.stderr
Rollup merge of #70038 - DutchGhost:const-forget-tests, r=RalfJung
[rust.git] / src / test / ui / anon-params / anon-params-denied-2018.stderr
1 error: expected one of `:`, `@`, or `|`, found `)`
2   --> $DIR/anon-params-denied-2018.rs:6:15
3    |
4 LL |     fn foo(i32);
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: i32);
11    |            ^^^^^^^^^
12 help: if this was a parameter name, give it a type
13    |
14 LL |     fn foo(i32: TypeName);
15    |            ^^^^^^^^^^^^^
16 help: if this is a type, explicitly ignore the parameter name
17    |
18 LL |     fn foo(_: i32);
19    |            ^^^^^^
20
21 error: expected one of `:`, `@`, or `|`, found `,`
22   --> $DIR/anon-params-denied-2018.rs:8:36
23    |
24 LL |     fn bar_with_default_impl(String, String) {}
25    |                                    ^ expected one of `:`, `@`, or `|`
26    |
27    = note: anonymous parameters are removed in the 2018 edition (see RFC 1685)
28 help: if this is a `self` type, give it a parameter name
29    |
30 LL |     fn bar_with_default_impl(self: String, String) {}
31    |                              ^^^^^^^^^^^^
32 help: if this was a parameter name, give it a type
33    |
34 LL |     fn bar_with_default_impl(String: TypeName, String) {}
35    |                              ^^^^^^^^^^^^^^^^
36 help: if this is a type, explicitly ignore the parameter name
37    |
38 LL |     fn bar_with_default_impl(_: String, String) {}
39    |                              ^^^^^^^^^
40
41 error: expected one of `:`, `@`, or `|`, found `)`
42   --> $DIR/anon-params-denied-2018.rs:8:44
43    |
44 LL |     fn bar_with_default_impl(String, String) {}
45    |                                            ^ expected one of `:`, `@`, or `|`
46    |
47    = note: anonymous parameters are removed in the 2018 edition (see RFC 1685)
48 help: if this was a parameter name, give it a type
49    |
50 LL |     fn bar_with_default_impl(String, String: TypeName) {}
51    |                                      ^^^^^^^^^^^^^^^^
52 help: if this is a type, explicitly ignore the parameter name
53    |
54 LL |     fn bar_with_default_impl(String, _: String) {}
55    |                                      ^^^^^^^^^
56
57 error: expected one of `:`, `@`, or `|`, found `,`
58   --> $DIR/anon-params-denied-2018.rs:13:22
59    |
60 LL |     fn baz(a:usize, b, c: usize) -> usize {
61    |                      ^ expected one of `:`, `@`, or `|`
62    |
63    = note: anonymous parameters are removed in the 2018 edition (see RFC 1685)
64 help: if this was a parameter name, give it a type
65    |
66 LL |     fn baz(a:usize, b: TypeName, c: usize) -> usize {
67    |                     ^^^^^^^^^^^
68 help: if this is a type, explicitly ignore the parameter name
69    |
70 LL |     fn baz(a:usize, _: b, c: usize) -> usize {
71    |                     ^^^^
72
73 error: aborting due to 4 previous errors
74