Handle safety keyword for extern block inner items

This commit is contained in:
Santiago Pastorino 2024-05-23 10:01:05 -03:00
parent a2c6f80a45
commit 6478d9e59c

View File

@ -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 => "",
}
}