]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/lifetime-in-pattern.stderr
Point (again) to more expressions with their type, even if not fully resolved
[rust.git] / src / test / ui / parser / lifetime-in-pattern.stderr
1 error: unexpected lifetime `'a` in pattern
2   --> $DIR/lifetime-in-pattern.rs:1:10
3    |
4 LL | fn test(&'a str) {
5    |          ^^ help: remove the lifetime
6
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 `|`
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: &'a 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(_: &'a str) {
25    |         ++
26
27 error: aborting due to 2 previous errors
28