ADD - IntoDiagnostic conformance for TargetDataLayoutErrors in rustc_errors
This way we comply with the Coherence rule given that IntoDiagnostic trait is defined in rustc_errors, and almost all other crates depend on it.
This commit is contained in:
parent
c0983a9aac
commit
5645cd5b09
8 changed files with 70 additions and 72 deletions
|
@ -56,7 +56,6 @@ use rustc_query_system::ich::StableHashingContext;
|
|||
use rustc_serialize::opaque::{FileEncodeResult, FileEncoder};
|
||||
use rustc_session::config::{CrateType, OutputFilenames};
|
||||
use rustc_session::cstore::CrateStoreDyn;
|
||||
use rustc_session::errors::TargetDataLayoutErrorsWrapper;
|
||||
use rustc_session::lint::Lint;
|
||||
use rustc_session::Limit;
|
||||
use rustc_session::Session;
|
||||
|
@ -1249,7 +1248,7 @@ impl<'tcx> TyCtxt<'tcx> {
|
|||
output_filenames: OutputFilenames,
|
||||
) -> GlobalCtxt<'tcx> {
|
||||
let data_layout = TargetDataLayout::parse(&s.target).unwrap_or_else(|err| {
|
||||
s.emit_fatal(TargetDataLayoutErrorsWrapper(err));
|
||||
s.emit_fatal(err);
|
||||
});
|
||||
let interners = CtxtInterners::new(arena);
|
||||
let common_types = CommonTypes::new(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue