1 error: lifetime may not live long enough
4 LL | fn f<'a, 'b>(y: &'b ()) {
5 | -- -- lifetime `'b` defined here
7 | lifetime `'a` defined here
8 LL | let x: &'a _ = &y;
9 | ^^^^^ type annotation requires that `'b` must outlive `'a`
11 = help: consider adding the following bound: `'b: 'a`
13 error[E0597]: `y` does not live long enough
14 --> $DIR/E0490.rs:2:20
16 LL | fn f<'a, 'b>(y: &'b ()) {
17 | -- lifetime `'a` defined here
18 LL | let x: &'a _ = &y;
19 | ----- ^^ borrowed value does not live long enough
21 | type annotation requires that `y` is borrowed for `'a`
24 | - `y` dropped here while still borrowed
26 error: aborting due to 2 previous errors
28 For more information about this error, try `rustc --explain E0597`.