Skip to content

Commit

Permalink
Merge pull request #1773 from dtolnay/unsafestatic
Browse files Browse the repository at this point in the history
Preserve extern static unsafety in ForeignItem::Verbatim
  • Loading branch information
dtolnay authored Oct 23, 2024
2 parents 2e159bc + 8d7814a commit c94df74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1896,7 +1896,7 @@ pub(crate) mod parsing {
input.parse::<Expr>()?;
}
let semi_token: Token![;] = input.parse()?;
if safe || has_value {
if unsafety.is_some() || safe || has_value {
Ok(ForeignItem::Verbatim(verbatim::between(&begin, input)))
} else {
Ok(ForeignItem::Static(ForeignItemStatic {
Expand Down

0 comments on commit c94df74

Please sign in to comment.