From cf6358a00540a83dcc6e8c243f3306ccdbb9c354 Mon Sep 17 00:00:00 2001 From: Igor Matuszewski Date: Tue, 4 Sep 2018 14:46:47 +0200 Subject: [PATCH] Fix Clippy opt-in with tool lints It seems that rustc doesn't handle `-Aclippy::all` and needs for the tool lint to be separated (`-A clippy::all`) --- src/build/rustc.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/build/rustc.rs b/src/build/rustc.rs index 984b80b3696..f15507ba1b6 100644 --- a/src/build/rustc.rs +++ b/src/build/rustc.rs @@ -70,8 +70,9 @@ crate fn rustc( let mut clippy_args = vec!["--cfg".to_owned(), r#"feature="cargo-clippy""#.to_owned()]; if clippy_pref == ClippyPreference::OptIn { - // `OptIn`: allow clippy require `#![warn(clippy)]` override in each workspace crate - clippy_args.push("-Aclippy".to_owned()); + // `OptIn`: Require explicit `#![warn(clippy::all)]` annotation in each workspace crate + clippy_args.push("-A".to_owned()); + clippy_args.push("clippy::all".to_owned()); } args.iter()