From 8ef759e0273ad97f1acbb1ea9f94322aa2a20147 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 2 Aug 2018 18:08:22 -0700 Subject: [PATCH] Fix fallout from rust-lang/rust#52841 --- clippy_lints/src/utils/mod.rs | 3 ++- tests/ui/author/for_loop.rs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/clippy_lints/src/utils/mod.rs b/clippy_lints/src/utils/mod.rs index a8c20ef4fa3..0bb06fce593 100644 --- a/clippy_lints/src/utils/mod.rs +++ b/clippy_lints/src/utils/mod.rs @@ -941,7 +941,8 @@ pub fn opt_def_id(def: Def) -> Option { Def::AssociatedExistential(id) | Def::GlobalAsm(id) => Some(id), - Def::Upvar(..) | Def::Local(_) | Def::Label(..) | Def::PrimTy(..) | Def::SelfTy(..) | Def::Err => None, + Def::Upvar(..) | Def::Local(_) | Def::Label(..) | Def::PrimTy(..) | Def::SelfTy(..) | + Def::ToolMod | Def::NonMacroAttr | Def::Err => None, } } diff --git a/tests/ui/author/for_loop.rs b/tests/ui/author/for_loop.rs index 5faf440676d..026aee4746d 100644 --- a/tests/ui/author/for_loop.rs +++ b/tests/ui/author/for_loop.rs @@ -1,4 +1,4 @@ -#![feature(tool_attributes)] +#![feature(tool_attributes, stmt_expr_attributes)] fn main() { #[clippy::author] -- 2.44.0