]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_metadata/creader.rs
Auto merge of #67996 - JohnTitor:clippy-up, r=JohnTitor
[rust.git] / src / librustc_metadata / creader.rs
index 80d7e71e96bb65f89c143a5738d17029c1776703..30d049d143eabc576d5ea4af9f3399bd36019565 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, 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_expand::base::SyntaxExtension;
-use syntax_pos::{Span, DUMMY_SP};
 
 use rustc_error_codes::*;
 
@@ -261,7 +260,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 +270,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 +280,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 +289,7 @@ fn verify_no_symbol_conflicts(&self, span: Span, root: &CrateRoot<'_>) {
                          will result in symbol conflicts between the two.",
                     root.name()
                 )
+                .emit();
             }
         });
     }