diff options
| author | bors <bors@rust-lang.org> | 2024-02-22 08:01:37 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-02-22 08:01:37 +0000 |
| commit | f70f19fef41cfdda75c92f163434c29ad046cf09 (patch) | |
| tree | f781338fb3f2e285e13f5cdb5478e8cacaebd093 /compiler/rustc_errors/src/lib.rs | |
| parent | 026b3b8e955e0571db39aa96fc9d7aba25cc4d66 (diff) | |
| parent | 6efffd723bc87f3a577f4f52fcffb6335406e9cb (diff) | |
| download | rust-f70f19fef41cfdda75c92f163434c29ad046cf09.tar.gz rust-f70f19fef41cfdda75c92f163434c29ad046cf09.zip | |
Auto merge of #121129 - nnethercote:codegen-Diags, r=estebank
Improve codegen diagnostic handling Clarify the workings of the temporary `Diagnostic` type used to send diagnostics from codegen threads to the main thread. r? `@estebank`
Diffstat (limited to 'compiler/rustc_errors/src/lib.rs')
| -rw-r--r-- | compiler/rustc_errors/src/lib.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs index 7e3d15ffc92..ada8fa2e965 100644 --- a/compiler/rustc_errors/src/lib.rs +++ b/compiler/rustc_errors/src/lib.rs @@ -37,9 +37,10 @@ extern crate self as rustc_errors; pub use codes::*; pub use diagnostic::{ - AddToDiagnostic, BugAbort, DecorateLint, Diagnostic, DiagnosticArg, DiagnosticArgName, - DiagnosticArgValue, DiagnosticBuilder, DiagnosticStyledString, EmissionGuarantee, FatalAbort, - IntoDiagnostic, IntoDiagnosticArg, StringPart, SubDiagnostic, SubdiagnosticMessageOp, + AddToDiagnostic, BugAbort, DecorateLint, Diagnostic, DiagnosticArg, DiagnosticArgMap, + DiagnosticArgName, DiagnosticArgValue, DiagnosticBuilder, DiagnosticStyledString, + EmissionGuarantee, FatalAbort, IntoDiagnostic, IntoDiagnosticArg, StringPart, SubDiagnostic, + SubdiagnosticMessageOp, }; pub use diagnostic_impls::{ DiagnosticArgFromDisplay, DiagnosticSymbolList, ExpectedLifetimeParameter, @@ -1496,9 +1497,8 @@ impl DiagCtxtInner { diag: &Diagnostic, msg: impl Into<SubdiagnosticMessage>, ) -> SubdiagnosticMessage { - let args = diag.args(); let msg = diag.subdiagnostic_message_to_diagnostic_message(msg); - self.eagerly_translate(msg, args) + self.eagerly_translate(msg, diag.args.iter()) } fn flush_delayed(&mut self) { |
