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