rust/tests/ui/async-await/issue-76547.stderr

33 lines
1.2 KiB
Plaintext
Raw Normal View History

2020-11-09 18:27:15 -06:00
error: lifetime may not live long enough
2022-04-01 12:13:25 -05:00
--> $DIR/issue-76547.rs:20:13
2020-11-09 18:27:15 -06:00
|
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]]) {
| ++++ ++ ++
2020-11-09 18:27:15 -06:00
error: lifetime may not live long enough
2022-04-01 12:13:25 -05:00
--> $DIR/issue-76547.rs:34:14
2020-11-09 18:27:15 -06:00
|
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 {
| ++++ ++ ++
2020-11-09 18:27:15 -06:00
error: aborting due to 2 previous errors