diff options
| author | Nixon Enraght-Moony <nixon.emoony@gmail.com> | 2022-07-02 18:25:55 +0100 |
|---|---|---|
| committer | Nixon Enraght-Moony <nixon.emoony@gmail.com> | 2022-07-02 23:30:03 +0100 |
| commit | 45f4f6ccf7fbccd81db84f2a7ee7881884668ab2 (patch) | |
| tree | 7a8ea8ff0380355200e00e2e07c3d5f0de8fe592 | |
| parent | ac595dd57a151a16a168e6596404ada8f079b778 (diff) | |
| download | rust-45f4f6ccf7fbccd81db84f2a7ee7881884668ab2.tar.gz rust-45f4f6ccf7fbccd81db84f2a7ee7881884668ab2.zip | |
ast: Add span to `Extern`
| -rw-r--r-- | src/items.rs | 2 | ||||
| -rw-r--r-- | src/utils.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/items.rs b/src/items.rs index bab881f4b4e..8f35068e35f 100644 --- a/src/items.rs +++ b/src/items.rs @@ -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, ), diff --git a/src/utils.rs b/src/utils.rs index 58fd95c656e..4b26f4e40df 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -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 { |
