]> 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 cfd7b76a22279d16f08772ba2a67eed48d166d16..b21715fadfe6f899b1caa4c8c03b6c13bc10c376 100644 (file)
@@ -20,6 +20,7 @@
 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 +30,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 +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();
             }
         });
     }