use crate::locator::{CrateLocator, CratePaths};
use crate::rmeta::{CrateDep, CrateMetadata, CrateNumMap, CrateRoot, MetadataBlob};
-use rustc::hir::def_id::CrateNum;
-use rustc::hir::def_id::LOCAL_CRATE;
use rustc::hir::map::Definitions;
use rustc::middle::cstore::DepKind;
use rustc::middle::cstore::{CrateSource, ExternCrate, ExternCrateSource, MetadataLoaderDyn};
use rustc::ty::TyCtxt;
use rustc_data_structures::svh::Svh;
use rustc_data_structures::sync::Lrc;
+use rustc_hir::def_id::CrateNum;
+use rustc_hir::def_id::LOCAL_CRATE;
use rustc_index::vec::IndexVec;
use rustc_target::spec::{PanicStrategy, TargetTriple};
use std::path::Path;
use std::{cmp, fs};
+use errors::struct_span_err;
use log::{debug, info, log_enabled};
use proc_macro::bridge::client::ProcMacro;
use rustc_expand::base::SyntaxExtension;
+use rustc_span::edition::Edition;
+use rustc_span::symbol::{sym, Symbol};
+use rustc_span::{Span, DUMMY_SP};
use syntax::ast;
use syntax::attr;
-use syntax::edition::Edition;
use syntax::expand::allocator::{global_allocator_spans, AllocatorKind};
-use syntax::span_fatal;
-use syntax::symbol::{sym, Symbol};
-use syntax_pos::{Span, DUMMY_SP};
use rustc_error_codes::*;
if self.local_crate_name == root.name()
&& self.sess.local_crate_disambiguator() == root.disambiguator()
{
- span_fatal!(
+ struct_span_err!(
self.sess,
span,
E0519,
will result in symbol conflicts between the two.",
root.name()
)
+ .emit()
}
// Check for conflicts with any crate loaded so far
other.hash() != root.hash()
{
// but different SVH
- span_fatal!(
+ struct_span_err!(
self.sess,
span,
E0523,
will result in symbol conflicts between the two.",
root.name()
)
+ .emit();
}
});
}