Improve async fn error message with link to workaround
diff --git a/syntax/parse.rs b/syntax/parse.rs
index ec89cbb..78e6a3f 100644
--- a/syntax/parse.rs
+++ b/syntax/parse.rs
@@ -373,6 +373,12 @@
"variadic function is not supported yet",
));
}
+ if foreign_fn.sig.asyncness.is_some() {
+ return Err(Error::new_spanned(
+ foreign_fn,
+ "async function is not directly supported yet, but see https://cxx.rs/async.html for a working approach",
+ ));
+ }
let mut doc = Doc::new();
let mut cxx_name = None;