about summary refs log tree commit diff
path: root/compiler/rustc_lint/src/errors.rs
diff options
context:
space:
mode:
authorRejyr <jerrylwang123@gmail.com>2022-09-21 20:42:52 -0400
committerRejyr <jerrylwang123@gmail.com>2023-01-09 17:07:25 -0500
commite3bb2ebfbfba0e928f27d2aea04cc070a1b8ebfe (patch)
tree22b4ee79c21d68c32a59eebd1a8173a76b4dc2f6 /compiler/rustc_lint/src/errors.rs
parent8b897bbce6902a646f5de5df6ec4d92b0af98788 (diff)
downloadrust-e3bb2ebfbfba0e928f27d2aea04cc070a1b8ebfe.tar.gz
rust-e3bb2ebfbfba0e928f27d2aea04cc070a1b8ebfe.zip
add: `lints` for `errors.rs`
Diffstat (limited to 'compiler/rustc_lint/src/errors.rs')
-rw-r--r--compiler/rustc_lint/src/errors.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_lint/src/errors.rs b/compiler/rustc_lint/src/errors.rs
index cc34357fa4b..82ec88fbeeb 100644
--- a/compiler/rustc_lint/src/errors.rs
+++ b/compiler/rustc_lint/src/errors.rs
@@ -1,3 +1,5 @@
+#![deny(rustc::untranslatable_diagnostic)]
+#![deny(rustc::diagnostic_outside_of_impl)]
 use rustc_errors::{
     fluent, AddToDiagnostic, Diagnostic, ErrorGuaranteed, Handler, IntoDiagnostic,
     SubdiagnosticMessage,
@@ -38,7 +40,7 @@ impl AddToDiagnostic for OverruledAttributeSub {
             OverruledAttributeSub::NodeSource { span, reason } => {
                 diag.span_label(span, fluent::lint_node_source);
                 if let Some(rationale) = reason {
-                    #[allow(rustc::diagnostic_outside_of_impl)]
+                    #[allow(rustc::untranslatable_diagnostic)]
                     diag.note(rationale.as_str());
                 }
             }