]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/issues/issue-62097.rs
add ui test for issue-62097
[rust.git] / src / test / ui / async-await / issues / issue-62097.rs
1 // edition:2018
2 async fn foo<F>(fun: F)
3 where
4     F: FnOnce() + 'static
5 {
6     fun()
7 }
8
9 struct Struct;
10
11 impl Struct {
12     pub async fn run_dummy_fn(&self) { //~ ERROR cannot infer
13         foo(|| self.bar()).await;
14     }
15
16     pub fn bar(&self) {}
17 }
18
19 fn main() {}