Migrate more types from LintDiagnostic to Diagnostic

This commit is contained in:
Guillaume Gomez
2026-03-03 17:22:18 +01:00
parent bd538f90fe
commit b5ff567193
48 changed files with 263 additions and 255 deletions
+3 -3
View File
@@ -11,7 +11,7 @@
Applicability, Diag, DiagArgValue, DiagCtxtHandle, Diagnostic, EmissionGuarantee, IntoDiagArg,
Level, Subdiagnostic, SuggestionStyle, msg,
};
use rustc_macros::{Diagnostic, LintDiagnostic, Subdiagnostic};
use rustc_macros::{Diagnostic, Subdiagnostic};
use rustc_session::errors::ExprParenthesesNeeded;
use rustc_span::edition::{Edition, LATEST_STABLE_EDITION};
use rustc_span::{Ident, Span, Symbol};
@@ -4277,7 +4277,7 @@ pub(crate) struct ExpectedRegisterClassOrExplicitRegister {
pub(crate) span: Span,
}
#[derive(LintDiagnostic)]
#[derive(Diagnostic)]
#[diag("unicode codepoint changing visible direction of text present in {$label}")]
#[note(
"these kind of unicode codepoints change the way text flows on applications that support them, but can cause confusion because they change the order of characters on the screen"
@@ -4360,7 +4360,7 @@ fn add_to_diag<G: EmissionGuarantee>(self, diag: &mut Diag<'_, G>) {
}
}
#[derive(LintDiagnostic)]
#[derive(Diagnostic)]
#[diag("missing pattern for `...` argument")]
pub(crate) struct VarargsWithoutPattern {
#[suggestion(