Skip to content

Commit 7548d95

Browse files
committed
UPDATE - resolve fixme and emit errors via Handler
1 parent 67eb01c commit 7548d95

File tree

1 file changed

+6
-13
lines changed
  • compiler/rustc_codegen_ssa/src/back

1 file changed

+6
-13
lines changed

compiler/rustc_codegen_ssa/src/back/write.rs

+6-13
Original file line numberDiff line numberDiff line change
@@ -872,19 +872,12 @@ fn execute_copy_from_cache_work_item<B: ExtraBackendMethods>(
872872
);
873873
match link_or_copy(&source_file, &output_path) {
874874
Ok(_) => Some(output_path),
875-
Err(_) => {
876-
// FIXME:
877-
// Should we add Translations support in Handler, or should we pass a session here ?
878-
//
879-
// As Luis Cardoso mentioned here https://github.com/rust-lang/rust/pull/100753#discussion_r952975345,
880-
// Translations support in Handler is tricky because SessionDiagnostic is not a trait,
881-
// and we can't implement it in Handler because rustc_errors cannot depend on rustc_session.
882-
//
883-
// As for passing a session here, my understanding is that all these errors should be reported via
884-
// the Shared Handler, which leads us to probably having to support Translations in another way.
885-
886-
// let diag_handler = cgcx.create_diag_handler();
887-
// diag_handler.emit_err(errors::CopyPathBuf { source_file, output_path, error });
875+
Err(error) => {
876+
cgcx.create_diag_handler().emit_err(errors::CopyPathBuf {
877+
source_file,
878+
output_path,
879+
error,
880+
});
888881
None
889882
}
890883
}

0 commit comments

Comments
 (0)