diff options
| author | Michael Goulet <michael@errs.io> | 2023-12-22 21:41:03 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-22 21:41:03 -0500 |
| commit | e0d7a72c46d554cb63a1f91a523bfc9e6e37d886 (patch) | |
| tree | fc591e9de6b3b6689bac8f3355a0c5db2537b675 /compiler/rustc_interface/src | |
| parent | 7dd095598badf3328877ab31039ade0e31b09c3a (diff) | |
| parent | 2cd14bc9394ca6675e08d02c02c5f9abfa813616 (diff) | |
| download | rust-e0d7a72c46d554cb63a1f91a523bfc9e6e37d886.tar.gz rust-e0d7a72c46d554cb63a1f91a523bfc9e6e37d886.zip | |
Rollup merge of #119171 - nnethercote:cleanup-errors-4, r=compiler-errors
Cleanup error handlers: round 4 More `rustc_errors` cleanups. A sequel to #118933. r? `@compiler-errors`
Diffstat (limited to 'compiler/rustc_interface/src')
| -rw-r--r-- | compiler/rustc_interface/src/interface.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_interface/src/util.rs | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/compiler/rustc_interface/src/interface.rs b/compiler/rustc_interface/src/interface.rs index d58d60fc8be..6c000380e71 100644 --- a/compiler/rustc_interface/src/interface.rs +++ b/compiler/rustc_interface/src/interface.rs @@ -347,7 +347,7 @@ pub fn run_compiler<R: Send>(config: Config, f: impl FnOnce(&Compiler) -> R + Se ) { Ok(bundle) => bundle, Err(e) => { - early_dcx.early_error(format!("failed to load fluent bundle: {e}")); + early_dcx.early_fatal(format!("failed to load fluent bundle: {e}")); } }; diff --git a/compiler/rustc_interface/src/util.rs b/compiler/rustc_interface/src/util.rs index bffa743218f..f230c5b172c 100644 --- a/compiler/rustc_interface/src/util.rs +++ b/compiler/rustc_interface/src/util.rs @@ -164,13 +164,13 @@ pub(crate) fn run_in_thread_pool_with_globals<F: FnOnce() -> R + Send, R: Send>( fn load_backend_from_dylib(early_dcx: &EarlyDiagCtxt, path: &Path) -> MakeBackendFn { let lib = unsafe { Library::new(path) }.unwrap_or_else(|err| { let err = format!("couldn't load codegen backend {path:?}: {err}"); - early_dcx.early_error(err); + early_dcx.early_fatal(err); }); let backend_sym = unsafe { lib.get::<MakeBackendFn>(b"__rustc_codegen_backend") } .unwrap_or_else(|e| { let err = format!("couldn't load codegen backend: {e}"); - early_dcx.early_error(err); + early_dcx.early_fatal(err); }); // Intentionally leak the dynamic library. We can't ever unload it @@ -271,7 +271,7 @@ fn get_codegen_sysroot( "failed to find a `codegen-backends` folder \ in the sysroot candidates:\n* {candidates}" ); - early_dcx.early_error(err); + early_dcx.early_fatal(err); }); info!("probing {} for a codegen backend", sysroot.display()); @@ -282,7 +282,7 @@ fn get_codegen_sysroot( sysroot.display(), e ); - early_dcx.early_error(err); + early_dcx.early_fatal(err); }); let mut file: Option<PathBuf> = None; @@ -310,7 +310,7 @@ fn get_codegen_sysroot( prev.display(), path.display() ); - early_dcx.early_error(err); + early_dcx.early_fatal(err); } file = Some(path.clone()); } @@ -319,7 +319,7 @@ fn get_codegen_sysroot( Some(ref s) => load_backend_from_dylib(early_dcx, s), None => { let err = format!("unsupported builtin codegen backend `{backend_name}`"); - early_dcx.early_error(err); + early_dcx.early_fatal(err); } } } |
