rust/src/test/ui/async-await/issues/issue-62097.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
254 B
Rust
Raw Normal View History

2019-10-23 12:25:05 -05:00
// edition:2018
async fn foo<F>(fun: F)
where
F: FnOnce() + 'static
{
fun()
}
struct Struct;
impl Struct {
pub async fn run_dummy_fn(&self) { //~ ERROR E0759
2019-10-23 12:25:05 -05:00
foo(|| self.bar()).await;
}
pub fn bar(&self) {}
}
fn main() {}