about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2024-01-30 15:52:20 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2024-01-30 18:46:08 +1100
commit06aa381adbd5bac561c57dc6fc0390da8ec45b69 (patch)
tree9e5c08b49f02c22be8aaab9e0fcd10d13bf5d438 /compiler/rustc_codegen_ssa
parent45dc19785df0cd23af30498d3e1221e5e78142dc (diff)
downloadrust-06aa381adbd5bac561c57dc6fc0390da8ec45b69.tar.gz
rust-06aa381adbd5bac561c57dc6fc0390da8ec45b69.zip
Remove `DiagnosticArgName` from `rustc_codegen_ssa`.
It's identical to the one in `rustc_errors`; use that instead.

Also remove some `rustc_errors::` qualifiers.
Diffstat (limited to 'compiler/rustc_codegen_ssa')
-rw-r--r--compiler/rustc_codegen_ssa/src/back/write.rs17
1 files changed, 9 insertions, 8 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/write.rs b/compiler/rustc_codegen_ssa/src/back/write.rs
index affd386361c..562359a6b39 100644
--- a/compiler/rustc_codegen_ssa/src/back/write.rs
+++ b/compiler/rustc_codegen_ssa/src/back/write.rs
@@ -14,8 +14,11 @@ use rustc_data_structures::memmap::Mmap;
 use rustc_data_structures::profiling::{SelfProfilerRef, VerboseTimingGuard};
 use rustc_data_structures::sync::Lrc;
 use rustc_errors::emitter::Emitter;
-use rustc_errors::{translation::Translate, DiagCtxt, FatalError, Level};
-use rustc_errors::{DiagnosticBuilder, DiagnosticMessage, ErrCode, Style};
+use rustc_errors::translation::Translate;
+use rustc_errors::{
+    DiagCtxt, DiagnosticArgName, DiagnosticArgValue, DiagnosticBuilder, DiagnosticMessage, ErrCode,
+    FatalError, FluentBundle, Level, Style,
+};
 use rustc_fs_util::link_or_copy;
 use rustc_hir::def_id::{CrateNum, LOCAL_CRATE};
 use rustc_incremental::{
@@ -995,11 +998,9 @@ pub(crate) enum Message<B: WriteBackendMethods> {
 /// process another codegen unit.
 pub struct CguMessage;
 
-type DiagnosticArgName<'source> = Cow<'source, str>;
-
 struct Diagnostic {
     msgs: Vec<(DiagnosticMessage, Style)>,
-    args: FxHashMap<DiagnosticArgName<'static>, rustc_errors::DiagnosticArgValue>,
+    args: FxHashMap<DiagnosticArgName<'static>, DiagnosticArgValue>,
     code: Option<ErrCode>,
     lvl: Level,
 }
@@ -1800,18 +1801,18 @@ impl SharedEmitter {
 }
 
 impl Translate for SharedEmitter {
-    fn fluent_bundle(&self) -> Option<&Lrc<rustc_errors::FluentBundle>> {
+    fn fluent_bundle(&self) -> Option<&Lrc<FluentBundle>> {
         None
     }
 
-    fn fallback_fluent_bundle(&self) -> &rustc_errors::FluentBundle {
+    fn fallback_fluent_bundle(&self) -> &FluentBundle {
         panic!("shared emitter attempted to translate a diagnostic");
     }
 }
 
 impl Emitter for SharedEmitter {
     fn emit_diagnostic(&mut self, diag: &rustc_errors::Diagnostic) {
-        let args: FxHashMap<Cow<'_, str>, rustc_errors::DiagnosticArgValue> =
+        let args: FxHashMap<Cow<'_, str>, DiagnosticArgValue> =
             diag.args().map(|(name, arg)| (name.clone(), arg.clone())).collect();
         drop(self.sender.send(SharedEmitterMessage::Diagnostic(Diagnostic {
             msgs: diag.messages.clone(),