1
Fork 0

Auto merge of #98827 - aDotInTheVoid:suggest-extern-block, r=nagisa

Suggest using block for `extern "abi" fn` with no body

`@rustbot` modify labels: +A-diagnostics
This commit is contained in:
bors 2022-07-07 04:18:47 +00:00
commit e78e747f53
12 changed files with 124 additions and 30 deletions

View file

@ -1272,8 +1272,8 @@ impl<'hir> LoweringContext<'_, 'hir> {
pub(super) fn lower_extern(&mut self, ext: Extern) -> abi::Abi {
match ext {
Extern::None => abi::Abi::Rust,
Extern::Implicit => abi::Abi::FALLBACK,
Extern::Explicit(abi) => self.lower_abi(abi),
Extern::Implicit(_) => abi::Abi::FALLBACK,
Extern::Explicit(abi, _) => self.lower_abi(abi),
}
}