Rename BuiltinLintDiagnostics as BuiltinLintDiag.

Not the dropping of the trailing `s` -- this type describes a single
diagnostic and its name should be singular.
This commit is contained in:
Nicholas Nethercote 2024-02-29 16:40:44 +11:00
parent d98ad0a181
commit 7aa0eea19c
23 changed files with 105 additions and 113 deletions

View file

@ -569,7 +569,7 @@ pub struct AmbiguityErrorDiag {
// This could be a closure, but then implementing derive trait
// becomes hacky (and it gets allocated).
#[derive(Debug)]
pub enum BuiltinLintDiagnostics {
pub enum BuiltinLintDiag {
Normal,
AbsPathWithModule(Span),
ProcMacroDeriveResolutionFallback(Span),
@ -684,7 +684,7 @@ pub struct BufferedEarlyLint {
pub lint_id: LintId,
/// Customization of the `Diag<'_>` for the lint.
pub diagnostic: BuiltinLintDiagnostics,
pub diagnostic: BuiltinLintDiag,
}
#[derive(Default, Debug)]
@ -704,7 +704,7 @@ impl LintBuffer {
node_id: NodeId,
span: MultiSpan,
msg: impl Into<DiagMessage>,
diagnostic: BuiltinLintDiagnostics,
diagnostic: BuiltinLintDiag,
) {
let lint_id = LintId::of(lint);
let msg = msg.into();
@ -723,7 +723,7 @@ impl LintBuffer {
sp: impl Into<MultiSpan>,
msg: impl Into<DiagMessage>,
) {
self.add_lint(lint, id, sp.into(), msg, BuiltinLintDiagnostics::Normal)
self.add_lint(lint, id, sp.into(), msg, BuiltinLintDiag::Normal)
}
pub fn buffer_lint_with_diagnostic(
@ -732,7 +732,7 @@ impl LintBuffer {
id: NodeId,
sp: impl Into<MultiSpan>,
msg: impl Into<DiagMessage>,
diagnostic: BuiltinLintDiagnostics,
diagnostic: BuiltinLintDiag,
) {
self.add_lint(lint, id, sp.into(), msg, diagnostic)
}