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 | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/crates/hir-def/src/item_tree/pretty.rs b/crates/hir-def/src/item_tree/pretty.rs index 7d5fdf056b..87c90a4c6a 100644 --- a/crates/hir-def/src/item_tree/pretty.rs +++ b/crates/hir-def/src/item_tree/pretty.rs @@ -498,23 +498,13 @@ impl Printer<'_> { wln!(self, "{}!(...);", path.display(self.db.upcast())); } ModItem::MacroRules(it) => { - let MacroRules { name, ast_id, def_site } = &self.tree[it]; - let _ = writeln!( - self, - "// AstId: {:?}, Span: {}", - ast_id.erase().into_raw(), - def_site, - ); + let MacroRules { name, ast_id } = &self.tree[it]; + self.print_ast_id(ast_id.erase()); wln!(self, "macro_rules! {} {{ ... }}", name.display(self.db.upcast())); } ModItem::Macro2(it) => { - let Macro2 { name, visibility, ast_id, def_site } = &self.tree[it]; - let _ = writeln!( - self, - "// AstId: {:?}, Span: {}", - ast_id.erase().into_raw(), - def_site, - ); + let Macro2 { name, visibility, ast_id } = &self.tree[it]; + self.print_ast_id(ast_id.erase()); self.print_visibility(*visibility); wln!(self, "macro {} {{ ... }}", name.display(self.db.upcast())); } |