summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_interface/src/proc_macro_decls.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_interface/src/proc_macro_decls.rs')
-rw-r--r--compiler/rustc_interface/src/proc_macro_decls.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_interface/src/proc_macro_decls.rs b/compiler/rustc_interface/src/proc_macro_decls.rs
index 9bf7778bf..1c58caa03 100644
--- a/compiler/rustc_interface/src/proc_macro_decls.rs
+++ b/compiler/rustc_interface/src/proc_macro_decls.rs
@@ -1,3 +1,4 @@
+use rustc_ast::attr;
use rustc_hir::def_id::LocalDefId;
use rustc_middle::ty::query::Providers;
use rustc_middle::ty::TyCtxt;
@@ -8,7 +9,7 @@ fn proc_macro_decls_static(tcx: TyCtxt<'_>, (): ()) -> Option<LocalDefId> {
for id in tcx.hir().items() {
let attrs = tcx.hir().attrs(id.hir_id());
- if tcx.sess.contains_name(attrs, sym::rustc_proc_macro_decls) {
+ if attr::contains_name(attrs, sym::rustc_proc_macro_decls) {
decls = Some(id.owner_id.def_id);
}
}