Rename DiagnosticArg{,Map,Name,Value}
as DiagArg{,Map,Name,Value}
.
This commit is contained in:
parent
899cb40809
commit
8199632aa8
40 changed files with 196 additions and 198 deletions
|
@ -27,7 +27,7 @@ use crate::errors;
|
|||
use rustc_ast as ast;
|
||||
use rustc_data_structures::unord::UnordMap;
|
||||
use rustc_data_structures::unord::UnordSet;
|
||||
use rustc_errors::{DiagnosticArgValue, IntoDiagnosticArg};
|
||||
use rustc_errors::{DiagArgValue, IntoDiagnosticArg};
|
||||
use rustc_hir::def_id::LOCAL_CRATE;
|
||||
use rustc_middle::mir::mono::CodegenUnitNameBuilder;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
|
@ -206,8 +206,8 @@ impl fmt::Display for CguReuse {
|
|||
}
|
||||
|
||||
impl IntoDiagnosticArg for CguReuse {
|
||||
fn into_diagnostic_arg(self) -> DiagnosticArgValue {
|
||||
DiagnosticArgValue::Str(Cow::Owned(self.to_string()))
|
||||
fn into_diagnostic_arg(self) -> DiagArgValue {
|
||||
DiagArgValue::Str(Cow::Owned(self.to_string()))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ use rustc_data_structures::sync::Lrc;
|
|||
use rustc_errors::emitter::Emitter;
|
||||
use rustc_errors::translation::Translate;
|
||||
use rustc_errors::{
|
||||
Diag, DiagCtxt, DiagnosticArgMap, DiagnosticMessage, ErrCode, FatalError, FluentBundle, Level,
|
||||
Diag, DiagArgMap, DiagCtxt, DiagnosticMessage, ErrCode, FatalError, FluentBundle, Level,
|
||||
MultiSpan, Style,
|
||||
};
|
||||
use rustc_fs_util::link_or_copy;
|
||||
|
@ -1013,7 +1013,7 @@ struct Diagnostic {
|
|||
messages: Vec<(DiagnosticMessage, Style)>,
|
||||
code: Option<ErrCode>,
|
||||
children: Vec<Subdiagnostic>,
|
||||
args: DiagnosticArgMap,
|
||||
args: DiagArgMap,
|
||||
}
|
||||
|
||||
// A cut-down version of `rustc_errors::SubDiagnostic` that impls `Send`. It's
|
||||
|
@ -1838,7 +1838,7 @@ impl Emitter for SharedEmitter {
|
|||
assert_eq!(diag.is_lint, None);
|
||||
// No sensible check for `diag.emitted_at`.
|
||||
|
||||
let args = mem::replace(&mut diag.args, DiagnosticArgMap::default());
|
||||
let args = mem::replace(&mut diag.args, DiagArgMap::default());
|
||||
drop(
|
||||
self.sender.send(SharedEmitterMessage::Diagnostic(Diagnostic {
|
||||
level: diag.level(),
|
||||
|
|
|
@ -4,8 +4,8 @@ use crate::assert_module_sources::CguReuse;
|
|||
use crate::back::command::Command;
|
||||
use crate::fluent_generated as fluent;
|
||||
use rustc_errors::{
|
||||
codes::*, Diag, DiagCtxt, DiagnosticArgValue, EmissionGuarantee, IntoDiagnostic,
|
||||
IntoDiagnosticArg, Level,
|
||||
codes::*, Diag, DiagArgValue, DiagCtxt, EmissionGuarantee, IntoDiagnostic, IntoDiagnosticArg,
|
||||
Level,
|
||||
};
|
||||
use rustc_macros::Diagnostic;
|
||||
use rustc_middle::ty::layout::LayoutError;
|
||||
|
@ -153,8 +153,8 @@ impl<'a> CopyPath<'a> {
|
|||
struct DebugArgPath<'a>(pub &'a Path);
|
||||
|
||||
impl IntoDiagnosticArg for DebugArgPath<'_> {
|
||||
fn into_diagnostic_arg(self) -> rustc_errors::DiagnosticArgValue {
|
||||
DiagnosticArgValue::Str(Cow::Owned(format!("{:?}", self.0)))
|
||||
fn into_diagnostic_arg(self) -> rustc_errors::DiagArgValue {
|
||||
DiagArgValue::Str(Cow::Owned(format!("{:?}", self.0)))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -975,10 +975,10 @@ pub enum ExpectedPointerMutability {
|
|||
}
|
||||
|
||||
impl IntoDiagnosticArg for ExpectedPointerMutability {
|
||||
fn into_diagnostic_arg(self) -> DiagnosticArgValue {
|
||||
fn into_diagnostic_arg(self) -> DiagArgValue {
|
||||
match self {
|
||||
ExpectedPointerMutability::Mut => DiagnosticArgValue::Str(Cow::Borrowed("*mut")),
|
||||
ExpectedPointerMutability::Not => DiagnosticArgValue::Str(Cow::Borrowed("*_")),
|
||||
ExpectedPointerMutability::Mut => DiagArgValue::Str(Cow::Borrowed("*mut")),
|
||||
ExpectedPointerMutability::Not => DiagArgValue::Str(Cow::Borrowed("*_")),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue