]> 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 cfd7b76a22279d16f08772ba2a67eed48d166d16..30d049d143eabc576d5ea4af9f3399bd36019565 100644 (file)
 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_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;
@@ -29,7 +29,6 @@
 use syntax::ast;
 use syntax::attr;
 use syntax::expand::allocator::{global_allocator_spans, AllocatorKind};
-use syntax::span_fatal;
 
 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();
             }
         });
     }