]> git.lizzy.rs Git - rust.git/blob - src/test/ui/underscore-lifetime/underscore-lifetime-binders.stderr
Auto merge of #54720 - davidtwco:issue-51191, r=nikomatsakis
[rust.git] / src / test / ui / underscore-lifetime / underscore-lifetime-binders.stderr
1 error[E0106]: missing lifetime specifier
2   --> $DIR/underscore-lifetime-binders.rs:12:17
3    |
4 LL | struct Baz<'a>(&'_ &'a u8); //~ ERROR missing lifetime specifier
5    |                 ^^ expected lifetime parameter
6
7 error[E0106]: missing lifetime specifier
8   --> $DIR/underscore-lifetime-binders.rs:14:10
9    |
10 LL | impl Foo<'_> { //~ ERROR missing lifetime specifier
11    |          ^^ expected lifetime parameter
12
13 error[E0262]: invalid lifetime parameter name: `'_`
14   --> $DIR/underscore-lifetime-binders.rs:18:8
15    |
16 LL | fn foo<'_> //~ ERROR invalid lifetime parameter name: `'_`
17    |        ^^ '_ is a reserved lifetime name
18
19 error[E0262]: invalid lifetime parameter name: `'_`
20   --> $DIR/underscore-lifetime-binders.rs:24:21
21    |
22 LL | fn meh() -> Box<for<'_> Meh<'_>> //~ ERROR invalid lifetime parameter name: `'_`
23    |                     ^^ '_ is a reserved lifetime name
24
25 error[E0106]: missing lifetime specifier
26   --> $DIR/underscore-lifetime-binders.rs:24:29
27    |
28 LL | fn meh() -> Box<for<'_> Meh<'_>> //~ ERROR invalid lifetime parameter name: `'_`
29    |                             ^^ expected lifetime parameter
30    |
31    = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
32    = help: consider giving it a 'static lifetime
33
34 error[E0106]: missing lifetime specifier
35   --> $DIR/underscore-lifetime-binders.rs:30:35
36    |
37 LL | fn foo2(_: &'_ u8, y: &'_ u8) -> &'_ u8 { y } //~ ERROR missing lifetime specifier
38    |                                   ^^ expected lifetime parameter
39    |
40    = help: this function's return type contains a borrowed value, but the signature does not say whether it is borrowed from `_` or `y`
41
42 error: aborting due to 6 previous errors
43
44 Some errors occurred: E0106, E0262.
45 For more information about an error, try `rustc --explain E0106`.