]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/issues/issue-62097.stderr
Rollup merge of #71627 - ldm0:autoderefarg, r=Dylan-DPC
[rust.git] / src / test / ui / async-await / issues / issue-62097.stderr
1 error: cannot infer an appropriate lifetime
2   --> $DIR/issue-62097.rs:12:31
3    |
4 LL |     pub async fn run_dummy_fn(&self) {
5    |                               ^^^^^ ...but this borrow...
6 LL |         foo(|| self.bar()).await;
7    |         --- this return type evaluates to the `'static` lifetime...
8    |
9 note: ...can't outlive the lifetime `'_` as defined on the method body at 12:31
10   --> $DIR/issue-62097.rs:12:31
11    |
12 LL |     pub async fn run_dummy_fn(&self) {
13    |                               ^
14
15 error: aborting due to previous error
16