1
Fork 0

compiler: remove rustc_abi::lookup and AbiUnsupported

These can be entirely replaced by the FromStr implementation.
This commit is contained in:
Jubilee Young 2025-02-10 23:03:10 -08:00
parent edff4fe2cc
commit f8570e8ac5
4 changed files with 15 additions and 18 deletions

View file

@ -1475,7 +1475,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
pub(super) fn lower_abi(&mut self, abi_str: StrLit) -> ExternAbi {
let ast::StrLit { symbol_unescaped, span, .. } = abi_str;
let extern_abi = rustc_abi::lookup(symbol_unescaped.as_str()).unwrap_or_else(|_| {
let extern_abi = symbol_unescaped.as_str().parse().unwrap_or_else(|_| {
self.error_on_invalid_abi(abi_str);
ExternAbi::Rust
});