From cebbba081e4609099df3921de8a1422b7ea52599 Mon Sep 17 00:00:00 2001 From: Camille GILLOT Date: Sat, 30 Jan 2021 17:47:51 +0100 Subject: Only store a LocalDefId in hir::Item. Items are guaranteed to be HIR owner. --- compiler/rustc_interface/src/proc_macro_decls.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/rustc_interface/src') diff --git a/compiler/rustc_interface/src/proc_macro_decls.rs b/compiler/rustc_interface/src/proc_macro_decls.rs index de08a4c8242..d0262935c89 100644 --- a/compiler/rustc_interface/src/proc_macro_decls.rs +++ b/compiler/rustc_interface/src/proc_macro_decls.rs @@ -26,7 +26,7 @@ struct Finder<'tcx> { impl<'v> ItemLikeVisitor<'v> for Finder<'_> { fn visit_item(&mut self, item: &hir::Item<'_>) { if self.tcx.sess.contains_name(&item.attrs, sym::rustc_proc_macro_decls) { - self.decls = Some(item.hir_id); + self.decls = Some(item.hir_id()); } } -- cgit 1.4.1-3-g733a5