about summary refs log tree commit diff
path: root/compiler/rustc_interface/src
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2021-01-24 13:17:54 +0100
committerCamille GILLOT <gillot.camille@gmail.com>2021-03-09 19:27:50 +0100
commitc701872a6cd9c3c5b0ef766dc237ff93bc3cc8d9 (patch)
tree6f32f6100bd9867ba3ae1e6b2bc94cf00d39ffff /compiler/rustc_interface/src
parent5474f17011fe92c68e810b2080a7e539dc5687ea (diff)
downloadrust-c701872a6cd9c3c5b0ef766dc237ff93bc3cc8d9.tar.gz
rust-c701872a6cd9c3c5b0ef766dc237ff93bc3cc8d9.zip
Remove hir::Item::attrs.
Diffstat (limited to 'compiler/rustc_interface/src')
-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 d0262935c89..4637055a82d 100644
--- a/compiler/rustc_interface/src/proc_macro_decls.rs
+++ b/compiler/rustc_interface/src/proc_macro_decls.rs
@@ -25,7 +25,8 @@ 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) {
+        let attrs = self.tcx.hir().attrs(item.hir_id());
+        if self.tcx.sess.contains_name(attrs, sym::rustc_proc_macro_decls) {
             self.decls = Some(item.hir_id());
         }
     }