Rollup merge of #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````
This commit is contained in:
commit
46a0448405
107 changed files with 89 additions and 166 deletions
|
@ -345,7 +345,7 @@ declare_tool_lint! {
|
|||
///
|
||||
/// More details on translatable diagnostics can be found [here](https://rustc-dev-guide.rust-lang.org/diagnostics/translation.html).
|
||||
pub rustc::UNTRANSLATABLE_DIAGNOSTIC,
|
||||
Allow,
|
||||
Deny,
|
||||
"prevent creation of diagnostics which cannot be translated",
|
||||
report_in_external_macro: true
|
||||
}
|
||||
|
@ -357,7 +357,7 @@ declare_tool_lint! {
|
|||
///
|
||||
/// More details on diagnostics implementations can be found [here](https://rustc-dev-guide.rust-lang.org/diagnostics/diagnostic-structs.html).
|
||||
pub rustc::DIAGNOSTIC_OUTSIDE_OF_IMPL,
|
||||
Allow,
|
||||
Deny,
|
||||
"prevent creation of diagnostics outside of `IntoDiagnostic`/`AddToDiagnostic` impls",
|
||||
report_in_external_macro: true
|
||||
}
|
||||
|
|
|
@ -37,8 +37,6 @@
|
|||
#![cfg_attr(not(bootstrap), feature(trait_upcasting))]
|
||||
#![feature(min_specialization)]
|
||||
#![feature(rustc_attrs)]
|
||||
#![deny(rustc::untranslatable_diagnostic)]
|
||||
#![deny(rustc::diagnostic_outside_of_impl)]
|
||||
#![allow(internal_features)]
|
||||
|
||||
#[macro_use]
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#![allow(rustc::untranslatable_diagnostic)]
|
||||
#![allow(rustc::diagnostic_outside_of_impl)]
|
||||
#![allow(rustc::untranslatable_diagnostic)]
|
||||
|
||||
use std::num::NonZeroU32;
|
||||
|
||||
use crate::errors::RequestedLevel;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue