Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Commit

Permalink
Automatically enable the cargo-clippy feature for conditionally enabl…
Browse files Browse the repository at this point in the history
…ing lints
  • Loading branch information
oli-obk committed Feb 4, 2018
1 parent e852c13 commit 432423c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/build/rustc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,14 @@ pub fn rustc(
let buf = Arc::new(Mutex::new(vec![]));
let err_buf = buf.clone();
let args: Vec<_> = if cfg!(feature = "clippy") {
args.iter().map(|s| s.to_owned()).chain(Some("-Aclippy".to_owned())).collect()
args.iter()
.map(|s| s.to_owned())
.chain(vec![
"-Aclippy".to_owned(),
"--cfg".to_owned(),
r#"feature="cargo-clippy""#.to_owned(),
])
.collect()
} else {
args.to_owned()
};
Expand Down

0 comments on commit 432423c

Please sign in to comment.