mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 17:24:06 +00:00
33 lines
1.2 KiB
Plaintext
33 lines
1.2 KiB
Plaintext
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
|
|
|