ast: Add span to Extern
This commit is contained in:
parent
ac595dd57a
commit
45f4f6ccf7
@ -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,
|
||||
),
|
||||
|
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user