]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #6224 - flip1995:rustup, r=flip1995
authorbors <bors@rust-lang.org>
Sun, 25 Oct 2020 15:45:12 +0000 (15:45 +0000)
committerbors <bors@rust-lang.org>
Sun, 25 Oct 2020 15:45:12 +0000 (15:45 +0000)
Rustup

r? `@ghost`

changelog: none

clippy_lints/src/utils/author.rs
clippy_lints/src/utils/inspector.rs

index 89425437eeead505ef765a955b15f50cefd21938..7250de3a41c0430c71579b057e4e97314e9a583b 100644 (file)
@@ -130,7 +130,7 @@ fn check_arm(&mut self, cx: &LateContext<'tcx>, arm: &'tcx hir::Arm<'_>) {
     }
 
     fn check_stmt(&mut self, cx: &LateContext<'tcx>, stmt: &'tcx hir::Stmt<'_>) {
-        if !has_attr(cx.sess(), stmt.kind.attrs()) {
+        if !has_attr(cx.sess(), stmt.kind.attrs(|id| cx.tcx.hir().item(id.id))) {
             return;
         }
         prelude();
index 93bd82994466a82e5f82ec04d4144bbbfd4ae213..4fbfb3be32cbff9e821171c9d3d9112a977fdd3b 100644 (file)
@@ -109,7 +109,7 @@ fn check_arm(&mut self, cx: &LateContext<'tcx>, arm: &'tcx hir::Arm<'_>) {
     }
 
     fn check_stmt(&mut self, cx: &LateContext<'tcx>, stmt: &'tcx hir::Stmt<'_>) {
-        if !has_attr(cx.sess(), stmt.kind.attrs()) {
+        if !has_attr(cx.sess(), stmt.kind.attrs(|id| cx.tcx.hir().item(id.id))) {
             return;
         }
         match stmt.kind {