Skip to content

Commit 45f4f6c

Browse files
committed
ast: Add span to Extern
1 parent ac595dd commit 45f4f6c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/items.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ impl<'a> Item<'a> {
148148
Item {
149149
unsafety: fm.unsafety,
150150
abi: format_extern(
151-
ast::Extern::from_abi(fm.abi),
151+
ast::Extern::from_abi(fm.abi, DUMMY_SP),
152152
config.force_explicit_abi(),
153153
true,
154154
),

src/utils.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,8 @@ pub(crate) fn format_extern(
138138
) -> Cow<'static, str> {
139139
let abi = match ext {
140140
ast::Extern::None => "Rust".to_owned(),
141-
ast::Extern::Implicit => "C".to_owned(),
142-
ast::Extern::Explicit(abi) => abi.symbol_unescaped.to_string(),
141+
ast::Extern::Implicit(_) => "C".to_owned(),
142+
ast::Extern::Explicit(abi, _) => abi.symbol_unescaped.to_string(),
143143
};
144144

145145
if abi == "Rust" && !is_mod {

0 commit comments

Comments
 (0)