1
Fork 0

Add safe/unsafe to static inside extern blocks

This commit is contained in:
Santiago Pastorino 2024-05-07 14:43:23 +02:00
parent b4cbdb7246
commit bac72cf7cf
No known key found for this signature in database
GPG key ID: 8131A24E0C79EFAF
27 changed files with 152 additions and 57 deletions

View file

@ -171,7 +171,8 @@ impl<'a> State<'a> {
self.print_use_tree(tree);
self.word(";");
}
ast::ItemKind::Static(box StaticItem { ty, mutability: mutbl, expr: body }) => {
ast::ItemKind::Static(box StaticItem { ty, safety, mutability: mutbl, expr: body }) => {
self.print_safety(*safety);
self.print_item_const(
item.ident,
Some(*mutbl),