2021-07-26 20:01:16 +00:00
|
|
|
error: lifetime may not live long enough
|
2024-07-26 10:04:02 +00:00
|
|
|
--> $DIR/error-handling.rs:21:16
|
2021-07-26 20:01:16 +00:00
|
|
|
|
|
|
|
|
LL | fn foo<'a, 'b, 'c>(x: &'static i32, mut y: &'a i32) -> E<'b, 'c> {
|
|
|
|
| -- -- lifetime `'b` defined here
|
|
|
|
| |
|
|
|
|
| lifetime `'a` defined here
|
|
|
|
...
|
2024-12-21 05:14:16 +00:00
|
|
|
LL | let u = v;
|
|
|
|
| - requirement occurs due to copying this value
|
|
|
|
...
|
2021-07-26 20:01:16 +00:00
|
|
|
LL | let _: &'b i32 = *u.0;
|
|
|
|
| ^^^^^^^ type annotation requires that `'a` must outlive `'b`
|
|
|
|
|
|
|
|
|
= help: consider adding the following bound: `'a: 'b`
|
|
|
|
|
2023-11-21 15:44:16 +00:00
|
|
|
error: aborting due to 1 previous error
|
2021-07-26 20:01:16 +00:00
|
|
|
|