diff options
| author | Ralf Jung <post@ralfj.de> | 2024-11-02 21:27:13 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-02 21:27:13 +0000 |
| commit | c67ea446048735af7e11ba483820be88895b4c23 (patch) | |
| tree | 0c8759952e9464f0e98bc499c9da790aa416694d /compiler/rustc_parse | |
| parent | 6630802a1a6f09f9e07ee4113da3414e5e275972 (diff) | |
| parent | c1b8d6611e7a29ed0ad700c28d2873a16760a448 (diff) | |
| download | rust-c67ea446048735af7e11ba483820be88895b4c23.tar.gz rust-c67ea446048735af7e11ba483820be88895b4c23.zip | |
Merge pull request #4009 from RalfJung/rustup
Rustup
Diffstat (limited to 'compiler/rustc_parse')
| -rw-r--r-- | compiler/rustc_parse/src/parser/item.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_parse/src/parser/item.rs b/compiler/rustc_parse/src/parser/item.rs index 36733726564..6b4e2d0f4e2 100644 --- a/compiler/rustc_parse/src/parser/item.rs +++ b/compiler/rustc_parse/src/parser/item.rs @@ -1194,6 +1194,7 @@ impl<'a> Parser<'a> { attrs: &mut AttrVec, mut safety: Safety, ) -> PResult<'a, ItemInfo> { + let extern_span = self.prev_token.uninterpolated_span(); let abi = self.parse_abi(); // ABI? // FIXME: This recovery should be tested better. if safety == Safety::Default @@ -1205,6 +1206,7 @@ impl<'a> Parser<'a> { let _ = self.eat_keyword(kw::Unsafe); } let module = ast::ForeignMod { + extern_span, safety, abi, items: self.parse_item_list(attrs, |p| p.parse_foreign_item(ForceCollect::No))?, |
