|
1 |
| -error: expected one of `:`, `@`, or `|`, found `<` |
| 1 | +error: generic args in patterns require the turbofish syntax |
2 | 2 | --> $DIR/issue-64252-self-type.rs:4:15
|
3 | 3 | |
|
4 | 4 | LL | pub fn foo(Box<Self>) { }
|
5 |
| - | ^ expected one of `:`, `@`, or `|` |
| 5 | + | ^ |
6 | 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 |
| 7 | +help: use `::<...>` instead of `<...>` to specify lifetime, type, or const arguments |
9 | 8 | |
|
10 |
| -LL | pub fn foo(self: Box<Self>) { } |
11 |
| - | +++++ |
12 |
| -help: if this is a type, explicitly ignore the parameter name |
13 |
| - | |
14 |
| -LL | pub fn foo(_: Box<Self>) { } |
15 |
| - | ++ |
| 9 | +LL | pub fn foo(Box::<Self>) { } |
| 10 | + | ++ |
16 | 11 |
|
17 |
| -error: expected one of `:`, `@`, or `|`, found `<` |
18 |
| - --> $DIR/issue-64252-self-type.rs:10:15 |
| 12 | +error: generic args in patterns require the turbofish syntax |
| 13 | + --> $DIR/issue-64252-self-type.rs:9:15 |
19 | 14 | |
|
20 | 15 | LL | fn bar(Box<Self>) { }
|
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 `self` type, give it a parameter name |
| 16 | + | ^ |
25 | 17 | |
|
26 |
| -LL | fn bar(self: Box<Self>) { } |
27 |
| - | +++++ |
28 |
| -help: if this is a type, explicitly ignore the parameter name |
| 18 | +help: use `::<...>` instead of `<...>` to specify lifetime, type, or const arguments |
29 | 19 | |
|
30 |
| -LL | fn bar(_: Box<Self>) { } |
31 |
| - | ++ |
| 20 | +LL | fn bar(Box::<Self>) { } |
| 21 | + | ++ |
32 | 22 |
|
33 | 23 | error: aborting due to 2 previous errors
|
34 | 24 |
|
0 commit comments