session: diagnostic migration lint on more fns
Apply the diagnostic migration lint to more functions on `Session`. Signed-off-by: David Wood <david.wood@huawei.com>
This commit is contained in:
parent
d45004806d
commit
2575b1abc9
33 changed files with 510 additions and 162 deletions
|
@ -5,11 +5,12 @@
|
|||
//! This API is completely unstable and subject to change.
|
||||
|
||||
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
|
||||
#![feature(hash_raw_entry)]
|
||||
#![feature(let_chains)]
|
||||
#![feature(extern_types)]
|
||||
#![feature(once_cell)]
|
||||
#![feature(hash_raw_entry)]
|
||||
#![feature(iter_intersperse)]
|
||||
#![feature(let_chains)]
|
||||
#![feature(never_type)]
|
||||
#![feature(once_cell)]
|
||||
#![recursion_limit = "256"]
|
||||
#![allow(rustc::potential_query_instability)]
|
||||
#![deny(rustc::untranslatable_diagnostic)]
|
||||
|
@ -22,7 +23,7 @@ extern crate tracing;
|
|||
|
||||
use back::write::{create_informational_target_machine, create_target_machine};
|
||||
|
||||
use errors::FailParsingTargetMachineConfigToTargetMachine;
|
||||
use errors::ParseTargetMachineConfig;
|
||||
pub use llvm_util::target_features;
|
||||
use rustc_ast::expand::allocator::AllocatorKind;
|
||||
use rustc_codegen_ssa::back::lto::{LtoModuleCodegen, SerializedModule, ThinModule};
|
||||
|
@ -169,6 +170,7 @@ impl WriteBackendMethods for LlvmCodegenBackend {
|
|||
type Module = ModuleLlvm;
|
||||
type ModuleBuffer = back::lto::ModuleBuffer;
|
||||
type TargetMachine = &'static mut llvm::TargetMachine;
|
||||
type TargetMachineError = crate::errors::LlvmError<'static>;
|
||||
type ThinData = back::lto::ThinData;
|
||||
type ThinBuffer = back::lto::ThinBuffer;
|
||||
fn print_pass_timings(&self) {
|
||||
|
@ -416,8 +418,7 @@ impl ModuleLlvm {
|
|||
let tm = match (cgcx.tm_factory)(tm_factory_config) {
|
||||
Ok(m) => m,
|
||||
Err(e) => {
|
||||
handler.emit_err(FailParsingTargetMachineConfigToTargetMachine { error: e });
|
||||
return Err(FatalError);
|
||||
return Err(handler.emit_almost_fatal(ParseTargetMachineConfig(e)));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue