We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bf1000f commit 7c5c7beCopy full SHA for 7c5c7be
tests/ui/async_fn.rs
@@ -0,0 +1,10 @@
1
+#[cxx::bridge]
2
+mod ffi {
3
+ extern "Rust" {
4
+ async fn f();
5
+ }
6
+}
7
+
8
+async fn f() {}
9
10
+fn main() {}
tests/ui/async_fn.stderr
@@ -0,0 +1,22 @@
+error[E0308]: mismatched types
+ --> $DIR/async_fn.rs:4:18
+ |
+4 | async fn f();
+ | ^
+ | |
+ | expected `()`, found opaque type
+ | possibly return type missing here?
+...
+8 | async fn f() {}
11
+ | - the `Output` of this `async fn`'s found opaque type
12
13
+ = note: expected unit type `()`
14
+ found opaque type `impl Future`
15
+help: consider `await`ing on the `Future`
16
17
+4 | async fn f.await();
18
+ | ^^^^^^
19
+help: try adding a semicolon
20
21
+4 | async fn f;();
22
0 commit comments