Auto merge of #4273 - mikerite:deny-warnings, r=flip1995

Deny warnings in CI

changelog: none
This commit is contained in:
bors 2019-07-15 07:51:29 +00:00
commit a73bb33399
5 changed files with 7 additions and 2 deletions

View file

@ -61,4 +61,5 @@ rustc-workspace-hack = "1.0.0"
rustc_tools_util = { version = "0.2.0", path = "rustc_tools_util"}
[features]
deny-warnings = []
debugging = []

View file

@ -7,8 +7,8 @@ if [ "$TRAVIS_OS_NAME" == "linux" ]; then
remark -f *.md -f doc/*.md > /dev/null
fi
# build clippy in debug mode and run tests
cargo build --features debugging
cargo test --features debugging
cargo build --features "debugging deny-warnings"
cargo test --features "debugging deny-warnings"
# for faster build, share target dir between subcrates
export CARGO_TARGET_DIR=`pwd`/target/
(cd clippy_lints && cargo test)

View file

@ -9,6 +9,7 @@
#![recursion_limit = "512"]
#![warn(rust_2018_idioms, trivial_casts, trivial_numeric_casts)]
#![deny(rustc::internal)]
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
#![feature(crate_visibility_modifier)]
#![feature(concat_idents)]

View file

@ -1,3 +1,4 @@
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
#![feature(rustc_private)]
// FIXME: switch to something more ergonomic here, once available.

View file

@ -1,3 +1,5 @@
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
use rustc_tools_util::*;
const CARGO_CLIPPY_HELP: &str = r#"Checks a package to catch common mistakes and improve your Rust code.