2019-04-07 10:07:36 -05:00
|
|
|
error: lifetime may not live long enough
|
2022-04-01 12:13:25 -05:00
|
|
|
--> $DIR/issue-55401.rs:3:5
|
2019-04-07 10:07:36 -05:00
|
|
|
|
|
|
|
|
LL | fn static_to_a_to_static_through_ref_in_tuple<'a>(x: &'a u32) -> &'static u32 {
|
|
|
|
| -- lifetime `'a` defined here
|
|
|
|
LL | let (ref y, _z): (&'a u32, u32) = (&22, 44);
|
|
|
|
LL | *y
|
|
|
|
| ^^ returning this value requires that `'a` must outlive `'static`
|
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|