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::{
|
use rustc_errors::{
|
||||||
fluent, AddToDiagnostic, Diagnostic, ErrorGuaranteed, Handler, IntoDiagnostic,
|
fluent, AddToDiagnostic, Diagnostic, ErrorGuaranteed, Handler, IntoDiagnostic,
|
||||||
SubdiagnosticMessage,
|
SubdiagnosticMessage,
|
||||||
|
@ -38,7 +40,7 @@ impl AddToDiagnostic for OverruledAttributeSub {
|
||||||
OverruledAttributeSub::NodeSource { span, reason } => {
|
OverruledAttributeSub::NodeSource { span, reason } => {
|
||||||
diag.span_label(span, fluent::lint_node_source);
|
diag.span_label(span, fluent::lint_node_source);
|
||||||
if let Some(rationale) = reason {
|
if let Some(rationale) = reason {
|
||||||
#[allow(rustc::diagnostic_outside_of_impl)]
|
#[allow(rustc::untranslatable_diagnostic)]
|
||||||
diag.note(rationale.as_str());
|
diag.note(rationale.as_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue