Enforce use of extern "C++" as the ABI string
diff --git a/syntax/parse.rs b/syntax/parse.rs
index b557584..d62899e 100644
--- a/syntax/parse.rs
+++ b/syntax/parse.rs
@@ -285,9 +285,9 @@
}
};
match name.value().as_str() {
- "C" | "C++" => Ok(Lang::Cxx),
+ "C++" => Ok(Lang::Cxx),
"Rust" => Ok(Lang::Rust),
- _ => Err(Error::new_spanned(abi, "unrecognized ABI")),
+ _ => Err(Error::new_spanned(abi, "unrecognized ABI, requires either \"C++\" or \"Rust\"")),
}
}
diff --git a/tests/ui/multiple_parse_error.stderr b/tests/ui/multiple_parse_error.stderr
index 4189507..7c89129 100644
--- a/tests/ui/multiple_parse_error.stderr
+++ b/tests/ui/multiple_parse_error.stderr
@@ -4,7 +4,7 @@
3 | struct Monad<T>;
| ^^^^^^^^^^^^^^^
-error: unrecognized ABI
+error: unrecognized ABI, requires either "C++" or "Rust"
--> $DIR/multiple_parse_error.rs:5:5
|
5 | extern "Haskell" {}