Skip to content

Commit a73bb33

Browse files
committed
Auto merge of #4273 - mikerite:deny-warnings, r=flip1995
Deny warnings in CI changelog: none
2 parents 48b50e8 + b523d35 commit a73bb33

File tree

5 files changed

+7
-2
lines changed

5 files changed

+7
-2
lines changed

Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,5 @@ rustc-workspace-hack = "1.0.0"
6161
rustc_tools_util = { version = "0.2.0", path = "rustc_tools_util"}
6262

6363
[features]
64+
deny-warnings = []
6465
debugging = []

ci/base-tests.sh

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

clippy_lints/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#![recursion_limit = "512"]
1010
#![warn(rust_2018_idioms, trivial_casts, trivial_numeric_casts)]
1111
#![deny(rustc::internal)]
12+
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
1213
#![feature(crate_visibility_modifier)]
1314
#![feature(concat_idents)]
1415

src/driver.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
12
#![feature(rustc_private)]
23

34
// FIXME: switch to something more ergonomic here, once available.

src/main.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
2+
13
use rustc_tools_util::*;
24

35
const CARGO_CLIPPY_HELP: &str = r#"Checks a package to catch common mistakes and improve your Rust code.

0 commit comments

Comments
 (0)