diff options
Diffstat (limited to 'compiler/rustc_ast_lowering/src/index.rs')
| -rw-r--r-- | compiler/rustc_ast_lowering/src/index.rs | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/compiler/rustc_ast_lowering/src/index.rs b/compiler/rustc_ast_lowering/src/index.rs index 2fc8f95689f..1ef64f5a352 100644 --- a/compiler/rustc_ast_lowering/src/index.rs +++ b/compiler/rustc_ast_lowering/src/index.rs @@ -381,20 +381,12 @@ impl<'a, 'hir> Visitor<'hir> for NodeCollector<'a, 'hir> { }) } - fn visit_trait_item_ref(&mut self, ii: &'hir TraitItemRef) { - // Do not visit the duplicate information in TraitItemRef. We want to - // map the actual nodes, not the duplicate ones in the *Ref. - let TraitItemRef { id, ident: _, span: _ } = *ii; - - self.visit_nested_trait_item(id); + fn visit_trait_item_ref(&mut self, id: &'hir TraitItemId) { + self.visit_nested_trait_item(*id); } - fn visit_impl_item_ref(&mut self, ii: &'hir ImplItemRef) { - // Do not visit the duplicate information in ImplItemRef. We want to - // map the actual nodes, not the duplicate ones in the *Ref. - let ImplItemRef { id, ident: _, span: _ } = *ii; - - self.visit_nested_impl_item(id); + fn visit_impl_item_ref(&mut self, id: &'hir ImplItemId) { + self.visit_nested_impl_item(*id); } fn visit_foreign_item_ref(&mut self, id: &'hir ForeignItemId) { |
