diff options
| author | SLASHLogin <loginmlgxd@gmail.com> | 2022-10-30 16:07:04 +0100 |
|---|---|---|
| committer | SLASHLogin <loginmlgxd@gmail.com> | 2022-11-09 14:56:21 +0100 |
| commit | 3728e95596fa937eac9188af0ffe177e94635a5b (patch) | |
| tree | 0db0485167b6efc955348d34cf86f0d74efcd9c4 /compiler/rustc_codegen_llvm/src/lib.rs | |
| parent | 67394e794519542490293487134f6d6293614ab1 (diff) | |
| download | rust-3728e95596fa937eac9188af0ffe177e94635a5b.tar.gz rust-3728e95596fa937eac9188af0ffe177e94635a5b.zip | |
Port diagnostics created by `Handler`
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/lib.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/lib.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/lib.rs b/compiler/rustc_codegen_llvm/src/lib.rs index af632b2ff54..246e82545c8 100644 --- a/compiler/rustc_codegen_llvm/src/lib.rs +++ b/compiler/rustc_codegen_llvm/src/lib.rs @@ -12,6 +12,8 @@ #![feature(iter_intersperse)] #![recursion_limit = "256"] #![allow(rustc::potential_query_instability)] +#![deny(rustc::untranslatable_diagnostic)] +#![deny(rustc::diagnostic_outside_of_impl)] #[macro_use] extern crate rustc_macros; @@ -20,6 +22,7 @@ extern crate tracing; use back::write::{create_informational_target_machine, create_target_machine}; +use errors::FailParsingTargetMachineConfigToTargetMachine; pub use llvm_util::target_features; use rustc_ast::expand::allocator::AllocatorKind; use rustc_codegen_ssa::back::lto::{LtoModuleCodegen, SerializedModule, ThinModule}; @@ -413,7 +416,7 @@ impl ModuleLlvm { let tm = match (cgcx.tm_factory)(tm_factory_config) { Ok(m) => m, Err(e) => { - handler.struct_err(&e).emit(); + handler.emit_err(FailParsingTargetMachineConfigToTargetMachine { error: e }); return Err(FatalError); } }; |
