diff options
Diffstat (limited to 'compiler/rustc_ast_lowering')
| -rw-r--r-- | compiler/rustc_ast_lowering/src/index.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_ast_lowering/src/item.rs | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/compiler/rustc_ast_lowering/src/index.rs b/compiler/rustc_ast_lowering/src/index.rs index 956cb580d10..db67ce8dc16 100644 --- a/compiler/rustc_ast_lowering/src/index.rs +++ b/compiler/rustc_ast_lowering/src/index.rs @@ -392,7 +392,7 @@ impl<'a, 'hir> Visitor<'hir> for NodeCollector<'a, 'hir> { 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: _, kind: _, span: _, trait_item_def_id: _ } = *ii; + let ImplItemRef { id, ident: _, kind: _, span: _ } = *ii; self.visit_nested_impl_item(id); } diff --git a/compiler/rustc_ast_lowering/src/item.rs b/compiler/rustc_ast_lowering/src/item.rs index bdcb750ba26..b2a69c7c00f 100644 --- a/compiler/rustc_ast_lowering/src/item.rs +++ b/compiler/rustc_ast_lowering/src/item.rs @@ -1128,6 +1128,11 @@ impl<'hir> LoweringContext<'_, 'hir> { span: self.lower_span(i.span), defaultness, has_delayed_lints: !self.delayed_lints.is_empty(), + trait_item_def_id: self + .resolver + .get_partial_res(i.id) + .map(|r| r.expect_full_res().opt_def_id()) + .unwrap_or(None), }; self.arena.alloc(item) } @@ -1157,11 +1162,6 @@ impl<'hir> LoweringContext<'_, 'hir> { panic!("macros should have been expanded by now") } }, - trait_item_def_id: self - .resolver - .get_partial_res(i.id) - .map(|r| r.expect_full_res().opt_def_id()) - .unwrap_or(None), } } |
