add: lints
for errors.rs
This commit is contained in:
parent
8b897bbce6
commit
e3bb2ebfbf
1 changed files with 3 additions and 1 deletions
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue