Skip to content

Commit 9d9a0dc

Browse files
committed
Auto merge of #13225 - Jarcho:warnings, r=flip1995
Use `-D warnings` instead of `deny-warnings` feature. r? `@flip1995` changelog: none
2 parents a411267 + 4e57b2c commit 9d9a0dc

File tree

28 files changed

+23
-52
lines changed

28 files changed

+23
-52
lines changed

.github/workflows/clippy.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ env:
2525
CARGO_TARGET_DIR: '${{ github.workspace }}/target'
2626
NO_FMT_TEST: 1
2727
CARGO_INCREMENTAL: 0
28+
RUSTFLAGS: -D warnings
2829

2930
concurrency:
3031
# For a given workflow, if we push to the same PR, cancel all previous builds on that PR.
@@ -47,25 +48,25 @@ jobs:
4748

4849
# Run
4950
- name: Build
50-
run: cargo build --tests --features deny-warnings,internal
51+
run: cargo build --tests --features internal
5152

5253
- name: Test
53-
run: cargo test --features deny-warnings,internal
54+
run: cargo test --features internal
5455

5556
- name: Test clippy_lints
56-
run: cargo test --features deny-warnings,internal
57+
run: cargo test --features internal
5758
working-directory: clippy_lints
5859

5960
- name: Test clippy_utils
60-
run: cargo test --features deny-warnings
61+
run: cargo test
6162
working-directory: clippy_utils
6263

6364
- name: Test rustc_tools_util
64-
run: cargo test --features deny-warnings
65+
run: cargo test
6566
working-directory: rustc_tools_util
6667

6768
- name: Test clippy_dev
68-
run: cargo test --features deny-warnings
69+
run: cargo test
6970
working-directory: clippy_dev
7071

7172
- name: Test clippy-driver

.github/workflows/clippy_bors.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ env:
1111
CARGO_TARGET_DIR: '${{ github.workspace }}/target'
1212
NO_FMT_TEST: 1
1313
CARGO_INCREMENTAL: 0
14+
RUSTFLAGS: -D warnings
1415

1516
concurrency:
1617
# For a given workflow, if we push to the same branch, cancel all previous builds on that branch.
@@ -85,34 +86,34 @@ jobs:
8586
8687
# Run
8788
- name: Build
88-
run: cargo build --tests --features deny-warnings,internal
89+
run: cargo build --tests --features internal
8990

9091
- name: Test
9192
if: matrix.host == 'x86_64-unknown-linux-gnu'
92-
run: cargo test --features deny-warnings,internal
93+
run: cargo test --features internal
9394

9495
- name: Test
9596
if: matrix.host != 'x86_64-unknown-linux-gnu'
96-
run: cargo test --features deny-warnings,internal -- --skip dogfood
97+
run: cargo test --features internal -- --skip dogfood
9798

9899
- name: Test clippy_lints
99-
run: cargo test --features deny-warnings,internal
100+
run: cargo test --features internal
100101
working-directory: clippy_lints
101102

102103
- name: Test clippy_utils
103-
run: cargo test --features deny-warnings
104+
run: cargo test
104105
working-directory: clippy_utils
105106

106107
- name: Test clippy_config
107-
run: cargo test --features deny-warnings
108+
run: cargo test
108109
working-directory: clippy_config
109110

110111
- name: Test rustc_tools_util
111-
run: cargo test --features deny-warnings
112+
run: cargo test
112113
working-directory: rustc_tools_util
113114

114115
- name: Test clippy_dev
115-
run: cargo test --features deny-warnings
116+
run: cargo test
116117
working-directory: clippy_dev
117118

118119
- name: Test clippy-driver

.github/workflows/clippy_dev.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ on:
1616
env:
1717
RUST_BACKTRACE: 1
1818
CARGO_INCREMENTAL: 0
19+
RUSTFLAGS: -D warnings
1920

2021
jobs:
2122
clippy_dev:
@@ -28,7 +29,7 @@ jobs:
2829

2930
# Run
3031
- name: Build
31-
run: cargo build --features deny-warnings
32+
run: cargo build
3233
working-directory: clippy_dev
3334

3435
- name: Test update_lints
@@ -38,6 +39,8 @@ jobs:
3839
run: cargo dev fmt --check
3940

4041
- name: Test cargo dev new lint
42+
env:
43+
RUSTFLAGS: -A unused-imports
4144
run: |
4245
cargo dev new_lint --name new_early_pass --pass early
4346
cargo dev new_lint --name new_late_pass --pass late

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ tokio = { version = "1", features = ["io-util"] }
5151
rustc_tools_util = "0.3.0"
5252

5353
[features]
54-
deny-warnings = ["clippy_lints/deny-warnings"]
5554
integration = ["tempfile"]
5655
internal = ["clippy_lints/internal", "tempfile"]
5756

clippy_config/Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ toml = "0.7.3"
1414
[dev-dependencies]
1515
walkdir = "2.3"
1616

17-
[features]
18-
deny-warnings = []
19-
2017
[package.metadata.rust-analyzer]
2118
# This crate uses #[feature(rustc_private)]
2219
rustc_private = true

clippy_config/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#![feature(rustc_private, array_windows, let_chains)]
2-
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
32
#![warn(
43
trivial_casts,
54
trivial_numeric_casts,

clippy_dev/Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ opener = "0.6"
1313
shell-escape = "0.1"
1414
walkdir = "2.3"
1515

16-
[features]
17-
deny-warnings = []
18-
1916
[package.metadata.rust-analyzer]
2017
# This package uses #[feature(rustc_private)]
2118
rustc_private = true

clippy_dev/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#![feature(let_chains)]
22
#![feature(rustc_private)]
3-
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
43
#![warn(
54
trivial_casts,
65
trivial_numeric_casts,

clippy_dev/src/main.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
21
// warn on lints, that are included in `rust-lang/rust`s bootstrap
32
#![warn(rust_2018_idioms, unused_lifetimes)]
43

clippy_lints/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ url = "2.2"
3232
walkdir = "2.3"
3333

3434
[features]
35-
deny-warnings = ["clippy_config/deny-warnings", "clippy_utils/deny-warnings"]
3635
# build clippy with internal lints enabled, off by default
3736
internal = ["serde_json", "tempfile", "regex"]
3837

0 commit comments

Comments
 (0)