From 6280a8c3fee0cc580a0294318ff26931d27fbf74 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Fri, 23 Feb 2024 15:57:49 +1100 Subject: [PATCH] Rename `DiagnosticSymbolList` as `DiagSymbolList`. --- compiler/rustc_errors/src/diagnostic_impls.rs | 8 ++++---- compiler/rustc_errors/src/lib.rs | 2 +- compiler/rustc_passes/src/errors.rs | 10 +++++----- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/compiler/rustc_errors/src/diagnostic_impls.rs b/compiler/rustc_errors/src/diagnostic_impls.rs index fb554face33..70c8d971868 100644 --- a/compiler/rustc_errors/src/diagnostic_impls.rs +++ b/compiler/rustc_errors/src/diagnostic_impls.rs @@ -227,15 +227,15 @@ impl IntoDiagnosticArg for rustc_lint_defs::Level { } #[derive(Clone)] -pub struct DiagnosticSymbolList(Vec); +pub struct DiagSymbolList(Vec); -impl From> for DiagnosticSymbolList { +impl From> for DiagSymbolList { fn from(v: Vec) -> Self { - DiagnosticSymbolList(v) + DiagSymbolList(v) } } -impl IntoDiagnosticArg for DiagnosticSymbolList { +impl IntoDiagnosticArg for DiagSymbolList { fn into_diagnostic_arg(self) -> DiagArgValue { DiagArgValue::StrListSepByAnd( self.0.into_iter().map(|sym| Cow::Owned(format!("`{sym}`"))).collect(), diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs index c4f92095a8b..c0de23d0916 100644 --- a/compiler/rustc_errors/src/lib.rs +++ b/compiler/rustc_errors/src/lib.rs @@ -42,7 +42,7 @@ pub use diagnostic::{ IntoDiagnosticArg, StringPart, Subdiag, SubdiagnosticMessageOp, }; pub use diagnostic_impls::{ - DiagArgFromDisplay, DiagnosticSymbolList, ExpectedLifetimeParameter, IndicateAnonymousLifetime, + DiagArgFromDisplay, DiagSymbolList, ExpectedLifetimeParameter, IndicateAnonymousLifetime, SingleLabelManySpans, }; pub use emitter::ColorConfig; diff --git a/compiler/rustc_passes/src/errors.rs b/compiler/rustc_passes/src/errors.rs index c5c16febec4..5f412bde2ee 100644 --- a/compiler/rustc_passes/src/errors.rs +++ b/compiler/rustc_passes/src/errors.rs @@ -6,8 +6,8 @@ use std::{ use crate::fluent_generated as fluent; use rustc_ast::Label; use rustc_errors::{ - codes::*, AddToDiagnostic, Applicability, Diag, DiagCtxt, DiagnosticSymbolList, - EmissionGuarantee, IntoDiagnostic, Level, MultiSpan, SubdiagnosticMessageOp, + codes::*, AddToDiagnostic, Applicability, Diag, DiagCtxt, DiagSymbolList, EmissionGuarantee, + IntoDiagnostic, Level, MultiSpan, SubdiagnosticMessageOp, }; use rustc_hir::{self as hir, ExprKind, Target}; use rustc_macros::{Diagnostic, LintDiagnostic, Subdiagnostic}; @@ -1565,7 +1565,7 @@ pub enum MultipleDeadCodes<'tcx> { num: usize, descr: &'tcx str, participle: &'tcx str, - name_list: DiagnosticSymbolList, + name_list: DiagSymbolList, #[subdiagnostic] parent_info: Option>, #[subdiagnostic] @@ -1577,7 +1577,7 @@ pub enum MultipleDeadCodes<'tcx> { num: usize, descr: &'tcx str, participle: &'tcx str, - name_list: DiagnosticSymbolList, + name_list: DiagSymbolList, #[subdiagnostic] change_fields_suggestion: ChangeFieldsToBeOfUnitType, #[subdiagnostic] @@ -1601,7 +1601,7 @@ pub struct ParentInfo<'tcx> { #[note(passes_ignored_derived_impls)] pub struct IgnoredDerivedImpls { pub name: Symbol, - pub trait_list: DiagnosticSymbolList, + pub trait_list: DiagSymbolList, pub trait_list_len: usize, }