diff options
Diffstat (limited to 'compiler/rustc_ast_lowering/src/index.rs')
| -rw-r--r-- | compiler/rustc_ast_lowering/src/index.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/compiler/rustc_ast_lowering/src/index.rs b/compiler/rustc_ast_lowering/src/index.rs index a86fa49755b..2fc8f95689f 100644 --- a/compiler/rustc_ast_lowering/src/index.rs +++ b/compiler/rustc_ast_lowering/src/index.rs @@ -397,12 +397,8 @@ impl<'a, 'hir> Visitor<'hir> for NodeCollector<'a, 'hir> { self.visit_nested_impl_item(id); } - fn visit_foreign_item_ref(&mut self, fi: &'hir ForeignItemRef) { - // Do not visit the duplicate information in ForeignItemRef. We want to - // map the actual nodes, not the duplicate ones in the *Ref. - let ForeignItemRef { id, ident: _, span: _ } = *fi; - - self.visit_nested_foreign_item(id); + fn visit_foreign_item_ref(&mut self, id: &'hir ForeignItemId) { + self.visit_nested_foreign_item(*id); } fn visit_where_predicate(&mut self, predicate: &'hir WherePredicate<'hir>) { |
