Rename DiagnosticSymbolList
as DiagSymbolList
.
This commit is contained in:
parent
e3c19a2928
commit
6280a8c3fe
@ -227,15 +227,15 @@ impl IntoDiagnosticArg for rustc_lint_defs::Level {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct DiagnosticSymbolList(Vec<Symbol>);
|
pub struct DiagSymbolList(Vec<Symbol>);
|
||||||
|
|
||||||
impl From<Vec<Symbol>> for DiagnosticSymbolList {
|
impl From<Vec<Symbol>> for DiagSymbolList {
|
||||||
fn from(v: Vec<Symbol>) -> Self {
|
fn from(v: Vec<Symbol>) -> Self {
|
||||||
DiagnosticSymbolList(v)
|
DiagSymbolList(v)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl IntoDiagnosticArg for DiagnosticSymbolList {
|
impl IntoDiagnosticArg for DiagSymbolList {
|
||||||
fn into_diagnostic_arg(self) -> DiagArgValue {
|
fn into_diagnostic_arg(self) -> DiagArgValue {
|
||||||
DiagArgValue::StrListSepByAnd(
|
DiagArgValue::StrListSepByAnd(
|
||||||
self.0.into_iter().map(|sym| Cow::Owned(format!("`{sym}`"))).collect(),
|
self.0.into_iter().map(|sym| Cow::Owned(format!("`{sym}`"))).collect(),
|
||||||
|
@ -42,7 +42,7 @@ pub use diagnostic::{
|
|||||||
IntoDiagnosticArg, StringPart, Subdiag, SubdiagnosticMessageOp,
|
IntoDiagnosticArg, StringPart, Subdiag, SubdiagnosticMessageOp,
|
||||||
};
|
};
|
||||||
pub use diagnostic_impls::{
|
pub use diagnostic_impls::{
|
||||||
DiagArgFromDisplay, DiagnosticSymbolList, ExpectedLifetimeParameter, IndicateAnonymousLifetime,
|
DiagArgFromDisplay, DiagSymbolList, ExpectedLifetimeParameter, IndicateAnonymousLifetime,
|
||||||
SingleLabelManySpans,
|
SingleLabelManySpans,
|
||||||
};
|
};
|
||||||
pub use emitter::ColorConfig;
|
pub use emitter::ColorConfig;
|
||||||
|
@ -6,8 +6,8 @@ use std::{
|
|||||||
use crate::fluent_generated as fluent;
|
use crate::fluent_generated as fluent;
|
||||||
use rustc_ast::Label;
|
use rustc_ast::Label;
|
||||||
use rustc_errors::{
|
use rustc_errors::{
|
||||||
codes::*, AddToDiagnostic, Applicability, Diag, DiagCtxt, DiagnosticSymbolList,
|
codes::*, AddToDiagnostic, Applicability, Diag, DiagCtxt, DiagSymbolList, EmissionGuarantee,
|
||||||
EmissionGuarantee, IntoDiagnostic, Level, MultiSpan, SubdiagnosticMessageOp,
|
IntoDiagnostic, Level, MultiSpan, SubdiagnosticMessageOp,
|
||||||
};
|
};
|
||||||
use rustc_hir::{self as hir, ExprKind, Target};
|
use rustc_hir::{self as hir, ExprKind, Target};
|
||||||
use rustc_macros::{Diagnostic, LintDiagnostic, Subdiagnostic};
|
use rustc_macros::{Diagnostic, LintDiagnostic, Subdiagnostic};
|
||||||
@ -1565,7 +1565,7 @@ pub enum MultipleDeadCodes<'tcx> {
|
|||||||
num: usize,
|
num: usize,
|
||||||
descr: &'tcx str,
|
descr: &'tcx str,
|
||||||
participle: &'tcx str,
|
participle: &'tcx str,
|
||||||
name_list: DiagnosticSymbolList,
|
name_list: DiagSymbolList,
|
||||||
#[subdiagnostic]
|
#[subdiagnostic]
|
||||||
parent_info: Option<ParentInfo<'tcx>>,
|
parent_info: Option<ParentInfo<'tcx>>,
|
||||||
#[subdiagnostic]
|
#[subdiagnostic]
|
||||||
@ -1577,7 +1577,7 @@ pub enum MultipleDeadCodes<'tcx> {
|
|||||||
num: usize,
|
num: usize,
|
||||||
descr: &'tcx str,
|
descr: &'tcx str,
|
||||||
participle: &'tcx str,
|
participle: &'tcx str,
|
||||||
name_list: DiagnosticSymbolList,
|
name_list: DiagSymbolList,
|
||||||
#[subdiagnostic]
|
#[subdiagnostic]
|
||||||
change_fields_suggestion: ChangeFieldsToBeOfUnitType,
|
change_fields_suggestion: ChangeFieldsToBeOfUnitType,
|
||||||
#[subdiagnostic]
|
#[subdiagnostic]
|
||||||
@ -1601,7 +1601,7 @@ pub struct ParentInfo<'tcx> {
|
|||||||
#[note(passes_ignored_derived_impls)]
|
#[note(passes_ignored_derived_impls)]
|
||||||
pub struct IgnoredDerivedImpls {
|
pub struct IgnoredDerivedImpls {
|
||||||
pub name: Symbol,
|
pub name: Symbol,
|
||||||
pub trait_list: DiagnosticSymbolList,
|
pub trait_list: DiagSymbolList,
|
||||||
pub trait_list_len: usize,
|
pub trait_list_len: usize,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user