Use DiagnosticArgName in a few more places.

This commit is contained in:
Nicholas Nethercote
2024-02-02 10:14:14 +11:00
parent df322fc29f
commit 6fdaf3ef7f
8 changed files with 18 additions and 17 deletions

View File

@@ -39,7 +39,6 @@ use rustc_target::spec::{MergeFunctions, SanitizerSet};
use crate::errors::ErrorCreatingRemarkDir;
use std::any::Any;
use std::borrow::Cow;
use std::fs;
use std::io;
use std::marker::PhantomData;
@@ -1812,7 +1811,7 @@ impl Translate for SharedEmitter {
impl Emitter for SharedEmitter {
fn emit_diagnostic(&mut self, diag: &rustc_errors::Diagnostic) {
let args: FxHashMap<Cow<'_, str>, DiagnosticArgValue> =
let args: FxHashMap<DiagnosticArgName, DiagnosticArgValue> =
diag.args().map(|(name, arg)| (name.clone(), arg.clone())).collect();
drop(self.sender.send(SharedEmitterMessage::Diagnostic(Diagnostic {
msgs: diag.messages.clone(),