We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ead8d81 + 52356ca commit 3091961Copy full SHA for 3091961
src/test/ui/async-with-closure.rs
@@ -0,0 +1,26 @@
1
+// compile-pass
2
+// edition:2018
3
+
4
+#![feature(async_await, await_macro)]
5
6
+trait MyClosure {
7
+ type Args;
8
+}
9
10
+impl<R> MyClosure for dyn FnMut() -> R
11
+where R: 'static {
12
+ type Args = ();
13
14
15
+struct MyStream<C: ?Sized + MyClosure> {
16
+ x: C::Args,
17
18
19
+async fn get_future<C: ?Sized + MyClosure>(_stream: MyStream<C>) {}
20
21
+async fn f() {
22
+ let messages: MyStream<FnMut()> = unimplemented!();
23
+ await!(get_future(messages));
24
25
26
+fn main() {}
0 commit comments