1
Fork 0

Rollup merge of #120575 - nnethercote:simplify-codegen-diag-handling, r=estebank

Simplify codegen diagnostic handling

Some nice improvements. Details in the individual commit logs.

r? ````@estebank````
This commit is contained in:
Matthias Krüger 2024-02-06 19:40:06 +01:00 committed by GitHub
commit a3d3ccf098
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 84 additions and 75 deletions

View file

@ -1810,7 +1810,7 @@ impl Translate for SharedEmitter {
}
impl Emitter for SharedEmitter {
fn emit_diagnostic(&mut self, diag: &rustc_errors::Diagnostic) {
fn emit_diagnostic(&mut self, diag: rustc_errors::Diagnostic) {
let args: FxHashMap<DiagnosticArgName, DiagnosticArgValue> =
diag.args().map(|(name, arg)| (name.clone(), arg.clone())).collect();
drop(self.sender.send(SharedEmitterMessage::Diagnostic(Diagnostic {