Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-def/src/item_tree/pretty.rs')
| -rw-r--r-- | crates/hir-def/src/item_tree/pretty.rs | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/crates/hir-def/src/item_tree/pretty.rs b/crates/hir-def/src/item_tree/pretty.rs index 5ab4718a36..9dce28b2e4 100644 --- a/crates/hir-def/src/item_tree/pretty.rs +++ b/crates/hir-def/src/item_tree/pretty.rs @@ -382,9 +382,23 @@ impl Printer<'_> { wln!(self, " = _;"); } ModItem::Static(it) => { - let Static { name, visibility, mutable, type_ref, ast_id } = &self.tree[it]; + let Static { + name, + visibility, + mutable, + type_ref, + ast_id, + has_safe_kw, + has_unsafe_kw, + } = &self.tree[it]; self.print_ast_id(ast_id.erase()); self.print_visibility(*visibility); + if *has_safe_kw { + w!(self, "safe "); + } + if *has_unsafe_kw { + w!(self, "unsafe "); + } w!(self, "static "); if *mutable { w!(self, "mut "); |