diff options
Diffstat (limited to 'compiler/rustc_interface/src/util.rs')
| -rw-r--r-- | compiler/rustc_interface/src/util.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/compiler/rustc_interface/src/util.rs b/compiler/rustc_interface/src/util.rs index 8d37b1053d8..910cafff769 100644 --- a/compiler/rustc_interface/src/util.rs +++ b/compiler/rustc_interface/src/util.rs @@ -88,7 +88,7 @@ pub fn create_session( ) { Ok(bundle) => bundle, Err(e) => { - early_error(sopts.error_format, &format!("failed to load fluent bundle: {e}")); + early_error(sopts.error_format, format!("failed to load fluent bundle: {e}")); } }; @@ -220,13 +220,13 @@ pub(crate) fn run_in_thread_pool_with_globals<F: FnOnce() -> R + Send, R: Send>( fn load_backend_from_dylib(path: &Path) -> MakeBackendFn { let lib = unsafe { Library::new(path) }.unwrap_or_else(|err| { let err = format!("couldn't load codegen backend {path:?}: {err}"); - early_error(ErrorOutputType::default(), &err); + early_error(ErrorOutputType::default(), 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_error(ErrorOutputType::default(), &err); + early_error(ErrorOutputType::default(), err); }); // Intentionally leak the dynamic library. We can't ever unload it @@ -320,7 +320,7 @@ fn get_codegen_sysroot(maybe_sysroot: &Option<PathBuf>, backend_name: &str) -> M "failed to find a `codegen-backends` folder \ in the sysroot candidates:\n* {candidates}" ); - early_error(ErrorOutputType::default(), &err); + early_error(ErrorOutputType::default(), err); }); info!("probing {} for a codegen backend", sysroot.display()); @@ -331,7 +331,7 @@ fn get_codegen_sysroot(maybe_sysroot: &Option<PathBuf>, backend_name: &str) -> M sysroot.display(), e ); - early_error(ErrorOutputType::default(), &err); + early_error(ErrorOutputType::default(), err); }); let mut file: Option<PathBuf> = None; @@ -359,7 +359,7 @@ fn get_codegen_sysroot(maybe_sysroot: &Option<PathBuf>, backend_name: &str) -> M prev.display(), path.display() ); - early_error(ErrorOutputType::default(), &err); + early_error(ErrorOutputType::default(), err); } file = Some(path.clone()); } @@ -368,7 +368,7 @@ fn get_codegen_sysroot(maybe_sysroot: &Option<PathBuf>, backend_name: &str) -> M Some(ref s) => load_backend_from_dylib(s), None => { let err = format!("unsupported builtin codegen backend `{backend_name}`"); - early_error(ErrorOutputType::default(), &err); + early_error(ErrorOutputType::default(), err); } } } |
