1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
error: lifetime may not live long enough
--> $DIR/issue-76547.rs:20:13
|
LL | async fn fut(bufs: &mut [&mut [u8]]) {
| - - let's call the lifetime of this reference `'2`
| |
| let's call the lifetime of this reference `'1`
LL | ListFut(bufs).await
| ^^^^ this usage requires that `'1` must outlive `'2`
|
help: consider introducing a named lifetime parameter
|
LL | async fn fut<'a>(bufs: &'a mut [&'a mut [u8]]) {
| ++++ ++ ++
error: lifetime may not live long enough
--> $DIR/issue-76547.rs:34:14
|
LL | async fn fut2(bufs: &mut [&mut [u8]]) -> i32 {
| - - let's call the lifetime of this reference `'2`
| |
| let's call the lifetime of this reference `'1`
LL | ListFut2(bufs).await
| ^^^^ this usage requires that `'1` must outlive `'2`
|
help: consider introducing a named lifetime parameter
|
LL | async fn fut2<'a>(bufs: &'a mut [&'a mut [u8]]) -> i32 {
| ++++ ++ ++
error: aborting due to 2 previous errors
|