Skip to content

Commit a349fc4

Browse files
committed
update Finder to store LocalDefId
1 parent 0b38596 commit a349fc4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compiler/rustc_interface/src/proc_macro_decls.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ fn proc_macro_decls_static(tcx: TyCtxt<'_>, (): ()) -> Option<LocalDefId> {
1010
for id in tcx.hir().items() {
1111
let attrs = finder.tcx.hir().attrs(id.hir_id());
1212
if finder.tcx.sess.contains_name(attrs, sym::rustc_proc_macro_decls) {
13-
finder.decls = Some(id.hir_id());
13+
finder.decls = Some(id.def_id);
1414
}
1515
}
1616

17-
finder.decls.map(|id| tcx.hir().local_def_id(id))
17+
finder.decls
1818
}
1919

2020
struct Finder<'tcx> {
2121
tcx: TyCtxt<'tcx>,
22-
decls: Option<hir::HirId>,
22+
decls: Option<hir::def_id::LocalDefId>,
2323
}
2424

2525
pub(crate) fn provide(providers: &mut Providers) {

0 commit comments

Comments
 (0)