about summary refs log tree commit diff
path: root/compiler/rustc_interface/src
diff options
context:
space:
mode:
authorMiguel Guarniz <mi9uel9@gmail.com>2022-04-09 14:00:22 -0400
committerMiguel Guarniz <mi9uel9@gmail.com>2022-04-09 14:00:22 -0400
commita349fc4f7a701ec5e5a4ef94fa93fa89658c9dc7 (patch)
treea7ebaf9d6bd35ba6523fadc5a3965d745ec82723 /compiler/rustc_interface/src
parent0b38596e8811adb1a69e1a43e6f51cdebc0e4f9b (diff)
downloadrust-a349fc4f7a701ec5e5a4ef94fa93fa89658c9dc7.tar.gz
rust-a349fc4f7a701ec5e5a4ef94fa93fa89658c9dc7.zip
update Finder to store LocalDefId
Diffstat (limited to 'compiler/rustc_interface/src')
-rw-r--r--compiler/rustc_interface/src/proc_macro_decls.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_interface/src/proc_macro_decls.rs b/compiler/rustc_interface/src/proc_macro_decls.rs
index 8652bd00fb7..5371c513d29 100644
--- a/compiler/rustc_interface/src/proc_macro_decls.rs
+++ b/compiler/rustc_interface/src/proc_macro_decls.rs
@@ -10,16 +10,16 @@ fn proc_macro_decls_static(tcx: TyCtxt<'_>, (): ()) -> Option<LocalDefId> {
     for id in tcx.hir().items() {
         let attrs = finder.tcx.hir().attrs(id.hir_id());
         if finder.tcx.sess.contains_name(attrs, sym::rustc_proc_macro_decls) {
-            finder.decls = Some(id.hir_id());
+            finder.decls = Some(id.def_id);
         }
     }
 
-    finder.decls.map(|id| tcx.hir().local_def_id(id))
+    finder.decls
 }
 
 struct Finder<'tcx> {
     tcx: TyCtxt<'tcx>,
-    decls: Option<hir::HirId>,
+    decls: Option<hir::def_id::LocalDefId>,
 }
 
 pub(crate) fn provide(providers: &mut Providers) {