ast: Add span to Extern

This commit is contained in:
Nixon Enraght-Moony 2022-07-02 18:25:55 +01:00
parent ac595dd57a
commit 45f4f6ccf7
2 changed files with 3 additions and 3 deletions

View File

@ -148,7 +148,7 @@ impl<'a> Item<'a> {
Item {
unsafety: fm.unsafety,
abi: format_extern(
ast::Extern::from_abi(fm.abi),
ast::Extern::from_abi(fm.abi, DUMMY_SP),
config.force_explicit_abi(),
true,
),

View File

@ -138,8 +138,8 @@ pub(crate) fn format_extern(
) -> Cow<'static, str> {
let abi = match ext {
ast::Extern::None => "Rust".to_owned(),
ast::Extern::Implicit => "C".to_owned(),
ast::Extern::Explicit(abi) => abi.symbol_unescaped.to_string(),
ast::Extern::Implicit(_) => "C".to_owned(),
ast::Extern::Explicit(abi, _) => abi.symbol_unescaped.to_string(),
};
if abi == "Rust" && !is_mod {