]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_metadata/creader.rs
Rollup merge of #67725 - ssomers:into_key_slice_mut, r=RalfJung
[rust.git] / src / librustc_metadata / creader.rs
index adb73d1c5fcc31abfd4af2b1bd587c23a914f7da..b21715fadfe6f899b1caa4c8c03b6c13bc10c376 100644 (file)
@@ -3,8 +3,6 @@
 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 rustc_error_codes::*;
 
@@ -261,7 +261,7 @@ fn verify_no_symbol_conflicts(&self, span: Span, root: &CrateRoot<'_>) {
         if self.local_crate_name == root.name()
             && self.sess.local_crate_disambiguator() == root.disambiguator()
         {
-            span_fatal!(
+            struct_span_err!(
                 self.sess,
                 span,
                 E0519,
@@ -271,6 +271,7 @@ fn verify_no_symbol_conflicts(&self, span: Span, root: &CrateRoot<'_>) {
                          will result in symbol conflicts between the two.",
                 root.name()
             )
+            .emit()
         }
 
         // Check for conflicts with any crate loaded so far
@@ -280,7 +281,7 @@ fn verify_no_symbol_conflicts(&self, span: Span, root: &CrateRoot<'_>) {
                other.hash() != root.hash()
             {
                 // but different SVH
-                span_fatal!(
+                struct_span_err!(
                     self.sess,
                     span,
                     E0523,
@@ -289,6 +290,7 @@ fn verify_no_symbol_conflicts(&self, span: Span, root: &CrateRoot<'_>) {
                          will result in symbol conflicts between the two.",
                     root.name()
                 )
+                .emit();
             }
         });
     }