Skip to content

Commit 419001d

Browse files
authored
Rollup merge of rust-lang#120693 - nnethercote:invert-diagnostic-lints, r=davidtwco
Invert diagnostic lints. That is, change `diagnostic_outside_of_impl` and `untranslatable_diagnostic` from `allow` to `deny`, because more than half of the compiler has been converted to use translated diagnostics. This commit removes more `deny` attributes than it adds `allow` attributes, which proves that this change is warranted. r? ````@davidtwco````
2 parents 7a82702 + 998c722 commit 419001d

File tree

4 files changed

+18
-3
lines changed

4 files changed

+18
-3
lines changed

clippy_config/src/lib.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
#![allow(
55
clippy::must_use_candidate,
66
clippy::missing_panics_doc,
7-
rustc::untranslatable_diagnostic_trivial
7+
rustc::diagnostic_outside_of_impl,
8+
rustc::untranslatable_diagnostic,
9+
rustc::untranslatable_diagnostic_trivial,
810
)]
911

1012
extern crate rustc_ast;

clippy_lints/src/lib.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@
1010
#![feature(stmt_expr_attributes)]
1111
#![recursion_limit = "512"]
1212
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
13-
#![allow(clippy::missing_docs_in_private_items, clippy::must_use_candidate)]
13+
#![allow(
14+
clippy::missing_docs_in_private_items,
15+
clippy::must_use_candidate,
16+
rustc::diagnostic_outside_of_impl,
17+
rustc::untranslatable_diagnostic,
18+
)]
1419
#![warn(trivial_casts, trivial_numeric_casts)]
1520
// warn on lints, that are included in `rust-lang/rust`s bootstrap
1621
#![warn(rust_2018_idioms, unused_lifetimes)]

clippy_utils/src/lib.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,13 @@
88
#![feature(assert_matches)]
99
#![recursion_limit = "512"]
1010
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
11-
#![allow(clippy::missing_errors_doc, clippy::missing_panics_doc, clippy::must_use_candidate)]
11+
#![allow(
12+
clippy::missing_errors_doc,
13+
clippy::missing_panics_doc,
14+
clippy::must_use_candidate,
15+
rustc::diagnostic_outside_of_impl,
16+
rustc::untranslatable_diagnostic,
17+
)]
1218
// warn on the same lints as `clippy_lints`
1319
#![warn(trivial_casts, trivial_numeric_casts)]
1420
// warn on lints, that are included in `rust-lang/rust`s bootstrap

src/driver.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(rustc::diagnostic_outside_of_impl)]
2+
#![allow(rustc::untranslatable_diagnostic)]
13
#![feature(rustc_private)]
24
#![feature(let_chains)]
35
#![feature(lazy_cell)]

0 commit comments

Comments
 (0)