diff options
| author | 许杰友 Jieyou Xu (Joe) <jieyouxu@outlook.com> | 2023-06-23 05:56:09 +0800 |
|---|---|---|
| committer | 许杰友 Jieyou Xu (Joe) <jieyouxu@outlook.com> | 2023-06-27 23:23:33 +0800 |
| commit | cef812bd958d5037224aebe3721f3ffc9c80965e (patch) | |
| tree | 19351f8407da440738b59892da7c9309b97bb82a /compiler/rustc_codegen_cranelift | |
| parent | f42f19b6d3d785a74dbe57aa395b6c288437dd51 (diff) | |
| download | rust-cef812bd958d5037224aebe3721f3ffc9c80965e.tar.gz rust-cef812bd958d5037224aebe3721f3ffc9c80965e.zip | |
Provide more context for `rustc +nightly -Zunstable-options` on stable
Diffstat (limited to 'compiler/rustc_codegen_cranelift')
| -rw-r--r-- | compiler/rustc_codegen_cranelift/src/pretty_clif.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/pretty_clif.rs b/compiler/rustc_codegen_cranelift/src/pretty_clif.rs index 1007b33eca4..5a4f9e80445 100644 --- a/compiler/rustc_codegen_cranelift/src/pretty_clif.rs +++ b/compiler/rustc_codegen_cranelift/src/pretty_clif.rs @@ -225,10 +225,10 @@ pub(crate) fn write_ir_file( let res = std::fs::File::create(clif_file_name).and_then(|mut file| write(&mut file)); if let Err(err) = res { // Using early_warn as no Session is available here - rustc_session::early_warn( + let handler = rustc_session::EarlyErrorHandler::new( rustc_session::config::ErrorOutputType::default(), - format!("error writing ir file: {}", err), ); + handler.early_warn(format!("error writing ir file: {}", err)); } } |
