]>
Commit | Line | Data |
---|---|---|
0bf4aa26 | 1 | error: unexpected lifetime `'a` in pattern |
0731742a | 2 | --> $DIR/lifetime-in-pattern.rs:1:10 |
0bf4aa26 XL |
3 | | |
4 | LL | fn test(&'a str) { | |
60c5eb7d | 5 | | ^^ help: remove the lifetime |
0bf4aa26 | 6 | |
60c5eb7d XL |
7 | error: expected one of `:`, `@`, or `|`, found `)` |
8 | --> $DIR/lifetime-in-pattern.rs:1:16 | |
9 | | | |
10 | LL | fn test(&'a str) { | |
11 | | ^ expected one of `:`, `@`, or `|` | |
6a06907d XL |
12 | | |
13 | = note: anonymous parameters are removed in the 2018 edition (see RFC 1685) | |
14 | help: if this is a `self` type, give it a parameter name | |
15 | | | |
16 | LL | fn test(self: &str) { | |
17 | | ^^^^^^^^^^ | |
18 | help: if this is a parameter name, give it a type | |
19 | | | |
20 | LL | fn test(str: &TypeName) { | |
21 | | ^^^^^^^^^^^^^^ | |
22 | help: if this is a type, explicitly ignore the parameter name | |
23 | | | |
24 | LL | fn test(_: &str) { | |
25 | | ^^^^^^^ | |
60c5eb7d XL |
26 | |
27 | error: aborting due to 2 previous errors | |
0bf4aa26 | 28 |