]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_lint/src/errors.rs
Rollup merge of #107656 - jonhoo:bump-rust-installer, r=Mark-Simulacrum
[rust.git] / compiler / rustc_lint / src / errors.rs
index 1a769893f5520aa8771274b624907953b2004c5c..f3ae26091863d964f7c9f827153d9f202f153cc7 100644 (file)
@@ -8,12 +8,12 @@
 
 #[derive(Diagnostic)]
 #[diag(lint_overruled_attribute, code = "E0453")]
-pub struct OverruledAttribute {
+pub struct OverruledAttribute<'a> {
     #[primary_span]
     pub span: Span,
     #[label]
     pub overruled: Span,
-    pub lint_level: String,
+    pub lint_level: &'a str,
     pub lint_source: Symbol,
     #[subdiagnostic]
     pub sub: OverruledAttributeSub,
@@ -38,6 +38,7 @@ fn add_to_diagnostic_with<F>(self, diag: &mut Diagnostic, _: F)
             OverruledAttributeSub::NodeSource { span, reason } => {
                 diag.span_label(span, fluent::lint_node_source);
                 if let Some(rationale) = reason {
+                    #[allow(rustc::untranslatable_diagnostic)]
                     diag.note(rationale.as_str());
                 }
             }