Skip to content

Commit e3bb2eb

Browse files
committed
add: lints for errors.rs
1 parent 8b897bb commit e3bb2eb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

compiler/rustc_lint/src/errors.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![deny(rustc::untranslatable_diagnostic)]
2+
#![deny(rustc::diagnostic_outside_of_impl)]
13
use rustc_errors::{
24
fluent, AddToDiagnostic, Diagnostic, ErrorGuaranteed, Handler, IntoDiagnostic,
35
SubdiagnosticMessage,
@@ -38,7 +40,7 @@ impl AddToDiagnostic for OverruledAttributeSub {
3840
OverruledAttributeSub::NodeSource { span, reason } => {
3941
diag.span_label(span, fluent::lint_node_source);
4042
if let Some(rationale) = reason {
41-
#[allow(rustc::diagnostic_outside_of_impl)]
43+
#[allow(rustc::untranslatable_diagnostic)]
4244
diag.note(rationale.as_str());
4345
}
4446
}

0 commit comments

Comments
 (0)