about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src/back
diff options
context:
space:
mode:
authorJhonny Bill Mena <jhonnybillm@gmail.com>2022-09-10 13:24:46 -0400
committerJhonny Bill Mena <jhonnybillm@gmail.com>2022-10-07 10:03:45 -0400
commit7548d952af07e7df18bb894b3f470d321f4d6c04 (patch)
treee3d7b366fe020e28e458cfb87260a53260f6987d /compiler/rustc_codegen_ssa/src/back
parent67eb01c3f3c9ce8237bb09ecb4a77b3030af025b (diff)
downloadrust-7548d952af07e7df18bb894b3f470d321f4d6c04.tar.gz
rust-7548d952af07e7df18bb894b3f470d321f4d6c04.zip
UPDATE - resolve fixme and emit errors via Handler
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/back')
-rw-r--r--compiler/rustc_codegen_ssa/src/back/write.rs19
1 files changed, 6 insertions, 13 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/write.rs b/compiler/rustc_codegen_ssa/src/back/write.rs
index 125b231b274..1f577e9f352 100644
--- a/compiler/rustc_codegen_ssa/src/back/write.rs
+++ b/compiler/rustc_codegen_ssa/src/back/write.rs
@@ -872,19 +872,12 @@ fn execute_copy_from_cache_work_item<B: ExtraBackendMethods>(
         );
         match link_or_copy(&source_file, &output_path) {
             Ok(_) => Some(output_path),
-            Err(_) => {
-                // FIXME:
-                // Should we add Translations support in Handler, or should we pass a session here ?
-                //
-                // As Luis Cardoso mentioned here https://github.com/rust-lang/rust/pull/100753#discussion_r952975345,
-                // Translations support in Handler is tricky because SessionDiagnostic is not a trait,
-                // and we can't implement it in Handler because rustc_errors cannot depend on rustc_session.
-                //
-                // As for passing a session here, my understanding is that all these errors should be reported via
-                // the Shared Handler, which leads us to probably having to support Translations in another way.
-
-                // let diag_handler = cgcx.create_diag_handler();
-                // diag_handler.emit_err(errors::CopyPathBuf { source_file, output_path, error });
+            Err(error) => {
+                cgcx.create_diag_handler().emit_err(errors::CopyPathBuf {
+                    source_file,
+                    output_path,
+                    error,
+                });
                 None
             }
         }