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