]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_metadata/native_libs.rs
Auto merge of #68258 - RalfJung:miri, r=RalfJung
[rust.git] / src / librustc_metadata / native_libs.rs
index c524d2074f523a49b2e14f3e6d875663bb08849e..9426d5e26f5e545bdce78adecafdf0d8e67156f8 100644 (file)
@@ -1,17 +1,16 @@
 use rustc::middle::cstore::{self, NativeLibrary};
+use rustc::session::parse::feature_err;
 use rustc::session::Session;
 use rustc::ty::TyCtxt;
 use rustc_data_structures::fx::FxHashSet;
+use rustc_error_codes::*;
+use rustc_errors::struct_span_err;
 use rustc_hir as hir;
 use rustc_hir::itemlikevisit::ItemLikeVisitor;
 use rustc_span::source_map::Span;
 use rustc_span::symbol::{kw, sym, Symbol};
 use rustc_target::spec::abi::Abi;
 use syntax::attr;
-use syntax::feature_gate::feature_err;
-use syntax::{span_err, struct_span_err};
-
-use rustc_error_codes::*;
 
 crate fn collect(tcx: TyCtxt<'_>) -> Vec<NativeLibrary> {
     let mut collector = Collector { tcx, libs: Vec::new() };
@@ -159,7 +158,7 @@ fn register_native_lib(&mut self, span: Option<Span>, lib: NativeLibrary) {
         if lib.kind == cstore::NativeFramework && !is_osx {
             let msg = "native frameworks are only available on macOS targets";
             match span {
-                Some(span) => span_err!(self.tcx.sess, span, E0455, "{}", msg),
+                Some(span) => struct_span_err!(self.tcx.sess, span, E0455, "{}", msg).emit(),
                 None => self.tcx.sess.err(msg),
             }
         }