mirror of
https://gitee.com/openharmony/third_party_rust_cxx
synced 2024-11-23 23:29:50 +00:00
Merge pull request #454 from dtolnay/externcxx
Enforce use of extern "C++" as the ABI string
This commit is contained in:
commit
1126426ab7
@ -285,9 +285,9 @@ fn parse_lang(abi: &Abi) -> Result<Lang> {
|
||||
}
|
||||
};
|
||||
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\"")),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,7 @@ error: struct with generic parameters is not supported yet
|
||||
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" {}
|
||||
|
Loading…
Reference in New Issue
Block a user