From: Alex Crichton Date: Fri, 3 Aug 2018 01:08:22 +0000 (-0700) Subject: Fix fallout from rust-lang/rust#52841 X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=8ef759e0273ad97f1acbb1ea9f94322aa2a20147;p=rust.git Fix fallout from rust-lang/rust#52841 --- 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]