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_codegen_llvm/src/errors.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_codegen_llvm/src/errors.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/errors.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/errors.rs b/compiler/rustc_codegen_llvm/src/errors.rs index 87e3774068b..24b3aa4223a 100644 --- a/compiler/rustc_codegen_llvm/src/errors.rs +++ b/compiler/rustc_codegen_llvm/src/errors.rs @@ -103,8 +103,7 @@ impl<G: EmissionGuarantee> IntoDiagnostic<'_, G> for ParseTargetMachineConfig<'_ fn into_diagnostic(self, dcx: &'_ DiagCtxt, level: Level) -> DiagnosticBuilder<'_, G> { let diag: DiagnosticBuilder<'_, G> = self.0.into_diagnostic(dcx, level); let (message, _) = diag.messages.first().expect("`LlvmError` with no message"); - let message = dcx.eagerly_translate_to_string(message.clone(), diag.args()); - + let message = dcx.eagerly_translate_to_string(message.clone(), diag.args.iter()); DiagnosticBuilder::new(dcx, level, fluent::codegen_llvm_parse_target_machine_config) .with_arg("error", message) } |
