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

+7-6
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

+9-8
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

+4-1
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

-1
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

-3
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

-1
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

-3
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

-1
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

-1
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

-1
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

clippy_lints/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#![feature(stmt_expr_attributes)]
1515
#![feature(unwrap_infallible)]
1616
#![recursion_limit = "512"]
17-
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
1817
#![allow(
1918
clippy::missing_docs_in_private_items,
2019
clippy::must_use_candidate,

clippy_utils/Cargo.toml

-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ rustc-semver = "1.1"
1212
# FIXME(f16_f128): remove when no longer needed for parsing
1313
rustc_apfloat = "0.2.0"
1414

15-
[features]
16-
deny-warnings = ["clippy_config/deny-warnings"]
17-
1815
[package.metadata.rust-analyzer]
1916
# This crate uses #[feature(rustc_private)]
2017
rustc_private = true

clippy_utils/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#![feature(assert_matches)]
1111
#![feature(unwrap_infallible)]
1212
#![recursion_limit = "512"]
13-
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
1413
#![allow(
1514
clippy::missing_errors_doc,
1615
clippy::missing_panics_doc,

declare_clippy_lint/Cargo.toml

-3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,3 @@ proc-macro = true
1111
itertools = "0.12"
1212
quote = "1.0.21"
1313
syn = "2.0"
14-
15-
[features]
16-
deny-warnings = []

declare_clippy_lint/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#![feature(let_chains)]
2-
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
32
// warn on lints, that are included in `rust-lang/rust`s bootstrap
43
#![warn(rust_2018_idioms, unused_lifetimes)]
54

lintcheck/Cargo.toml

-3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,3 @@ tar = "0.4"
2525
toml = "0.7.3"
2626
ureq = { version = "2.2", features = ["json"] }
2727
walkdir = "2.3"
28-
29-
[features]
30-
deny-warnings = []

rustc_tools_util/Cargo.toml

-3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,3 @@ categories = ["development-tools"]
1010
edition = "2018"
1111

1212
[dependencies]
13-
14-
[features]
15-
deny-warnings = []

rustc_tools_util/src/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
2-
31
use std::str;
42

53
/// This macro creates the version string during compilation from the

src/driver.rs

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#![allow(rustc::untranslatable_diagnostic)]
33
#![feature(rustc_private)]
44
#![feature(let_chains)]
5-
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
65
// warn on lints, that are included in `rust-lang/rust`s bootstrap
76
#![warn(rust_2018_idioms, unused_lifetimes)]
87
// warn on rustc internal lints

src/main.rs

-1
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

tests/check-fmt.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
21
#![warn(rust_2018_idioms, unused_lifetimes)]
32

43
use std::path::PathBuf;

tests/compile-test.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#![feature(is_sorted)]
2-
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
32
#![warn(rust_2018_idioms, unused_lifetimes)]
43
#![allow(unused_extern_crates)]
54

tests/dogfood.rs

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
//!
44
//! See [Eating your own dog food](https://en.wikipedia.org/wiki/Eating_your_own_dog_food) for context
55
6-
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
76
#![warn(rust_2018_idioms, unused_lifetimes)]
87

98
use itertools::Itertools;

tests/integration.rs

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
//! Clippy doesn't produce an ICE. Lint warnings are ignored by this test.
99
1010
#![cfg(feature = "integration")]
11-
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
1211
#![warn(rust_2018_idioms, unused_lifetimes)]
1312

1413
use std::env;

tests/lint_message_convention.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
21
#![warn(rust_2018_idioms, unused_lifetimes)]
32

43
use std::ffi::OsStr;

tests/missing-test-files.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
21
#![warn(rust_2018_idioms, unused_lifetimes)]
32
#![allow(clippy::assertions_on_constants)]
43
#![feature(path_file_prefix)]

tests/versioncheck.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
21
#![warn(rust_2018_idioms, unused_lifetimes)]
32
#![allow(clippy::single_match_else)]
43

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
[package]
22
name = "path_dep"
33
version = "0.1.0"
4+
5+
[features]
6+
primary_package_test = []

0 commit comments

Comments
 (0)