mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 08:44:35 +00:00
add: lints
for errors.rs
This commit is contained in:
parent
8b897bbce6
commit
e3bb2ebfbf
@ -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…
Reference in New Issue
Block a user