blob: 7577b95fa2e2f94c0ececdb5519f81caf6565bfe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
error[E0759]: `self` has an anonymous lifetime `'_` but it needs to satisfy a `'static` lifetime requirement
--> $DIR/issue-62097.rs:16:31
|
LL | pub async fn run_dummy_fn(&self) {
| ^^^^^ this data with an anonymous lifetime `'_`...
LL |
LL | foo(|| self.bar()).await;
| --- ...is used and required to live as long as `'static` here
|
note: `'static` lifetime requirement introduced by this bound
--> $DIR/issue-62097.rs:8:19
|
LL | F: FnOnce() + 'static
| ^^^^^^^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0759`.
|