]>
Commit | Line | Data |
---|---|---|
b7449926 XL |
1 | error: expected one of `:` or `@`, found `)` |
2 | --> $DIR/anon-params-denied-2018.rs:6:15 | |
3 | | | |
532ac7d7 | 4 | LL | fn foo(i32); |
dc9dc135 | 5 | | ^ expected one of `:` or `@` here |
0731742a XL |
6 | | |
7 | = note: anonymous parameters are removed in the 2018 edition (see RFC 1685) | |
dc9dc135 XL |
8 | help: if this was a parameter name, give it a type |
9 | | | |
10 | LL | fn foo(i32: TypeName); | |
11 | | ^^^^^^^^^^^^^ | |
12 | help: if this is a type, explicitly ignore the parameter name | |
13 | | | |
14 | LL | fn foo(_: i32); | |
15 | | ^^^^^^ | |
b7449926 XL |
16 | |
17 | error: expected one of `:` or `@`, found `,` | |
18 | --> $DIR/anon-params-denied-2018.rs:8:36 | |
19 | | | |
20 | LL | fn bar_with_default_impl(String, String) {} | |
dc9dc135 XL |
21 | | ^ expected one of `:` or `@` here |
22 | | | |
23 | = note: anonymous parameters are removed in the 2018 edition (see RFC 1685) | |
24 | help: if this was a parameter name, give it a type | |
25 | | | |
26 | LL | fn bar_with_default_impl(String: TypeName, String) {} | |
27 | | ^^^^^^^^^^^^^^^^ | |
28 | help: if this is a type, explicitly ignore the parameter name | |
29 | | | |
30 | LL | fn bar_with_default_impl(_: String, String) {} | |
31 | | ^^^^^^^^^ | |
32 | ||
33 | error: expected one of `:` or `@`, found `)` | |
34 | --> $DIR/anon-params-denied-2018.rs:8:44 | |
35 | | | |
36 | LL | fn bar_with_default_impl(String, String) {} | |
37 | | ^ expected one of `:` or `@` here | |
0731742a XL |
38 | | |
39 | = note: anonymous parameters are removed in the 2018 edition (see RFC 1685) | |
dc9dc135 XL |
40 | help: if this was a parameter name, give it a type |
41 | | | |
42 | LL | fn bar_with_default_impl(String, String: TypeName) {} | |
43 | | ^^^^^^^^^^^^^^^^ | |
44 | help: if this is a type, explicitly ignore the parameter name | |
45 | | | |
46 | LL | fn bar_with_default_impl(String, _: String) {} | |
47 | | ^^^^^^^^^ | |
48 | ||
49 | error: expected one of `:` or `@`, found `,` | |
50 | --> $DIR/anon-params-denied-2018.rs:13:22 | |
51 | | | |
52 | LL | fn baz(a:usize, b, c: usize) -> usize { | |
53 | | ^ expected one of `:` or `@` here | |
54 | | | |
55 | = note: anonymous parameters are removed in the 2018 edition (see RFC 1685) | |
56 | help: if this was a parameter name, give it a type | |
57 | | | |
58 | LL | fn baz(a:usize, b: TypeName, c: usize) -> usize { | |
59 | | ^^^^^^^^^^^ | |
60 | help: if this is a type, explicitly ignore the parameter name | |
61 | | | |
62 | LL | fn baz(a:usize, _: b, c: usize) -> usize { | |
63 | | ^^^^ | |
b7449926 | 64 | |
dc9dc135 | 65 | error: aborting due to 4 previous errors |
b7449926 | 66 |