make unsupported_calling_conventions a hard error

This commit is contained in:
Ralf Jung
2024-09-03 18:48:15 +02:00
parent bfab34af4c
commit de3cbf3c56
15 changed files with 97 additions and 201 deletions

View File

@@ -2757,10 +2757,9 @@ impl Target {
}
}
/// Returns a None if the UNSUPPORTED_CALLING_CONVENTIONS lint should be emitted
pub fn is_abi_supported(&self, abi: Abi) -> Option<bool> {
pub fn is_abi_supported(&self, abi: Abi) -> bool {
use Abi::*;
Some(match abi {
match abi {
Rust
| C { .. }
| System { .. }
@@ -2819,9 +2818,9 @@ impl Target {
// architectures for which these calling conventions are actually well defined.
Stdcall { .. } | Fastcall { .. } if self.arch == "x86" => true,
Vectorcall { .. } if ["x86", "x86_64"].contains(&&self.arch[..]) => true,
// Return a `None` for other cases so that we know to emit a future compat lint.
Stdcall { .. } | Fastcall { .. } | Vectorcall { .. } => return None,
})
// Reject these calling conventions everywhere else.
Stdcall { .. } | Fastcall { .. } | Vectorcall { .. } => false,
}
}
/// Minimum integer size in bits that this target can perform atomic