]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/issue-76547.stderr
Rollup merge of #82259 - osa1:issue82156, r=petrochenkov
[rust.git] / src / test / ui / async-await / issue-76547.stderr
1 error[E0623]: lifetime mismatch
2   --> $DIR/issue-76547.rs:20:13
3    |
4 LL | async fn fut(bufs: &mut [&mut [u8]]) {
5    |                          ---------   -
6    |                          |           |
7    |                          |           this `async fn` implicitly returns an `impl Future<Output = ()>`
8    |                          this parameter and the returned future are declared with different lifetimes...
9 LL |     ListFut(bufs).await
10    |             ^^^^ ...but data from `bufs` is held across an await point here
11
12 error[E0623]: lifetime mismatch
13   --> $DIR/issue-76547.rs:34:14
14    |
15 LL | async fn fut2(bufs: &mut [&mut [u8]]) -> i32 {
16    |                           ---------      ---
17    |                           |              |
18    |                           |              this `async fn` implicitly returns an `impl Future<Output = i32>`
19    |                           this parameter and the returned future are declared with different lifetimes...
20 LL |     ListFut2(bufs).await
21    |              ^^^^ ...but data from `bufs` is held across an await point here
22
23 error: aborting due to 2 previous errors
24
25 For more information about this error, try `rustc --explain E0623`.