diff --git a/src/item.rs b/src/item.rs index de83e28ae..a24623edb 100644 --- a/src/item.rs +++ b/src/item.rs @@ -1896,7 +1896,7 @@ pub(crate) mod parsing { input.parse::()?; } 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 {