diff options
| author | Ben Kimock <kimockb@gmail.com> | 2024-02-09 20:22:15 -0500 |
|---|---|---|
| committer | Ben Kimock <kimockb@gmail.com> | 2024-02-09 20:22:15 -0500 |
| commit | 3d4a9f504780dd8f9ba4e7921cce8d8517c20aa6 (patch) | |
| tree | 0b59781e0dd8d550b7e1cdc2e97ca41a9e2bf702 /compiler/rustc_codegen_ssa/src/back | |
| parent | f4cfd872028398da2b2d85c368c51f4d007dc6af (diff) | |
| download | rust-3d4a9f504780dd8f9ba4e7921cce8d8517c20aa6.tar.gz rust-3d4a9f504780dd8f9ba4e7921cce8d8517c20aa6.zip | |
Turn the "no saved object file in work product" ICE into a translatable fatal error
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/back')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/back/write.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/write.rs b/compiler/rustc_codegen_ssa/src/back/write.rs index 9b24339d255..a63642d76b9 100644 --- a/compiler/rustc_codegen_ssa/src/back/write.rs +++ b/compiler/rustc_codegen_ssa/src/back/write.rs @@ -913,7 +913,9 @@ fn execute_copy_from_cache_work_item<B: ExtraBackendMethods>( let object = load_from_incr_comp_dir( cgcx.output_filenames.temp_path(OutputType::Object, Some(&module.name)), - module.source.saved_files.get("o").expect("no saved object file in work product"), + module.source.saved_files.get("o").unwrap_or_else(|| { + cgcx.create_dcx().emit_fatal(errors::NoSavedObjectFile { cgu_name: &module.name }) + }), ); let dwarf_object = module.source.saved_files.get("dwo").as_ref().and_then(|saved_dwarf_object_file| { |
