]> git.lizzy.rs Git - rust.git/commitdiff
Fix fallout from rust-lang/rust#52841
authorAlex Crichton <alex@alexcrichton.com>
Fri, 3 Aug 2018 01:08:22 +0000 (18:08 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Fri, 3 Aug 2018 01:08:22 +0000 (18:08 -0700)
clippy_lints/src/utils/mod.rs
tests/ui/author/for_loop.rs

index a8c20ef4fa37de3e469b4150bab6cfa8c270153d..0bb06fce593046d21997a30c70c6bb6a8b2d8b80 100644 (file)
@@ -941,7 +941,8 @@ pub fn opt_def_id(def: Def) -> Option<DefId> {
         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,
     }
 }
 
index 5faf440676d09444e0691bcc00b2e7ba5696acdf..026aee4746d157ae6d7c3f2d7a4b755ff663b6cb 100644 (file)
@@ -1,4 +1,4 @@
-#![feature(tool_attributes)]
+#![feature(tool_attributes, stmt_expr_attributes)]
 
 fn main() {
     #[clippy::author]