1
Fork 0

Port diagnostics created by Handler

This commit is contained in:
SLASHLogin 2022-10-30 16:07:04 +01:00
parent 67394e7945
commit 3728e95596
4 changed files with 24 additions and 8 deletions

View file

@ -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);
}
};