Rollup merge of #132182 - jieyouxu:downgrade-untranslatable, r=compiler-errors
Downgrade `untranslatable_diagnostic` and `diagnostic_outside_of_impl` to `allow` Current implementation of translatable diagnostics infrastructure unfortunately causes some friction for compiler contributors. While we don't have a redesign that causes less friction in place, let's downgrade the internal `untranslatable_diagnostic` and `diagnostic_outside_of_impl` lints so we don't indicate to contributors that they *have* to use the current translation infra. I purposefully left `#[allow(untranslatable_diagnostic)]` and `#[allow(diagnostic_outside_of_impl)]` instances untouched because that seems like unnecessary additional churn. See <https://github.com/rust-lang/rust/issues/132181> for context. r? `@davidtwco` (or wg-diagnostics/compiler)
This commit is contained in:
commit
5dd60103fa
1 changed files with 2 additions and 2 deletions
|
@ -427,7 +427,7 @@ declare_tool_lint! {
|
||||||
/// More details on translatable diagnostics can be found
|
/// More details on translatable diagnostics can be found
|
||||||
/// [here](https://rustc-dev-guide.rust-lang.org/diagnostics/translation.html).
|
/// [here](https://rustc-dev-guide.rust-lang.org/diagnostics/translation.html).
|
||||||
pub rustc::UNTRANSLATABLE_DIAGNOSTIC,
|
pub rustc::UNTRANSLATABLE_DIAGNOSTIC,
|
||||||
Deny,
|
Allow,
|
||||||
"prevent creation of diagnostics which cannot be translated",
|
"prevent creation of diagnostics which cannot be translated",
|
||||||
report_in_external_macro: true
|
report_in_external_macro: true
|
||||||
}
|
}
|
||||||
|
@ -440,7 +440,7 @@ declare_tool_lint! {
|
||||||
/// More details on diagnostics implementations can be found
|
/// More details on diagnostics implementations can be found
|
||||||
/// [here](https://rustc-dev-guide.rust-lang.org/diagnostics/diagnostic-structs.html).
|
/// [here](https://rustc-dev-guide.rust-lang.org/diagnostics/diagnostic-structs.html).
|
||||||
pub rustc::DIAGNOSTIC_OUTSIDE_OF_IMPL,
|
pub rustc::DIAGNOSTIC_OUTSIDE_OF_IMPL,
|
||||||
Deny,
|
Allow,
|
||||||
"prevent diagnostic creation outside of `Diagnostic`/`Subdiagnostic`/`LintDiagnostic` impls",
|
"prevent diagnostic creation outside of `Diagnostic`/`Subdiagnostic`/`LintDiagnostic` impls",
|
||||||
report_in_external_macro: true
|
report_in_external_macro: true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue