Produce error message for a few more unsupported signatures
diff --git a/syntax/parse.rs b/syntax/parse.rs
index 78e6a3f..25d95e6 100644
--- a/syntax/parse.rs
+++ b/syntax/parse.rs
@@ -379,6 +379,18 @@
"async function is not directly supported yet, but see https://cxx.rs/async.html for a working approach",
));
}
+ if foreign_fn.sig.constness.is_some() {
+ return Err(Error::new_spanned(
+ foreign_fn,
+ "const extern function is not supported",
+ ));
+ }
+ if let Some(abi) = &foreign_fn.sig.abi {
+ return Err(Error::new_spanned(
+ abi,
+ "explicit ABI on extern function is not supported",
+ ));
+ }
let mut doc = Doc::new();
let mut cxx_name = None;