2024-08-13 16:38:24 -05:00
|
|
|
error: lifetime may not live long enough
|
2024-08-25 15:56:06 -05:00
|
|
|
--> $DIR/implied-bounds-on-nested-references-plus-variance-unnormalized.rs:12:5
|
2024-08-13 16:38:24 -05:00
|
|
|
|
|
|
|
|
LL | fn extend<'a, 'b>(x: &'a str) -> &'b str {
|
|
|
|
| -- -- lifetime `'b` defined here
|
|
|
|
| |
|
|
|
|
| lifetime `'a` defined here
|
|
|
|
LL | (extend_inner as fn(_) -> _)(x)
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a`
|
|
|
|
|
|
|
|
|
= help: consider adding the following bound: `'a: 'b`
|
|
|
|
|
|
|
|
error: aborting due to 1 previous error
|
|
|
|
|