Skip to content

Commit

Permalink
Handle safety keyword for extern block inner items
Browse files Browse the repository at this point in the history
  • Loading branch information
spastorino committed Jun 4, 2024
1 parent a2c6f80 commit 6478d9e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ pub(crate) fn format_defaultness(defaultness: ast::Defaultness) -> &'static str
pub(crate) fn format_safety(unsafety: ast::Safety) -> &'static str {
match unsafety {
ast::Safety::Unsafe(..) => "unsafe ",
ast::Safety::Safe(..) => "safe ",
ast::Safety::Default => "",
}
}
Expand Down

0 comments on commit 6478d9e

Please sign in to comment.