blob: f66787bd6fc29e21c7322a8b251bb09f8cc0c452 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
//@ edition: 2021
//@ check-pass
//@ revisions: current next
//@ ignore-compare-mode-next-solver (explicit revisions)
//@[next] compile-flags: -Znext-solver
use std::future::Future;
use std::any::Any;
struct Struct;
impl Struct {
fn method(&self) {}
}
fn fake_async_closure<F, Fut>(_: F)
where
F: Fn(Struct) -> Fut,
Fut: Future<Output = ()>,
{}
fn main() {
fake_async_closure(async |s| {
s.method();
})
}
|