update Finder to store LocalDefId
This commit is contained in:
parent
0b38596e88
commit
a349fc4f7a
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user