From 127489a89636898bf40101e39faaf91f2f0a308f Mon Sep 17 00:00:00 2001 From: DarkEld3r Date: Tue, 9 Aug 2016 13:13:04 +0300 Subject: [PATCH] Update compiler error 0093 to use new error format --- src/librustc_typeck/check/intrinsic.rs | 7 +++++-- src/test/compile-fail/E0093.rs | 4 +++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/librustc_typeck/check/intrinsic.rs b/src/librustc_typeck/check/intrinsic.rs index 8a53c59b4c7fa..33452b441ca81 100644 --- a/src/librustc_typeck/check/intrinsic.rs +++ b/src/librustc_typeck/check/intrinsic.rs @@ -297,8 +297,11 @@ pub fn check_intrinsic_type(ccx: &CrateCtxt, it: &hir::ForeignItem) { } ref other => { - span_err!(tcx.sess, it.span, E0093, - "unrecognized intrinsic function: `{}`", *other); + struct_span_err!(tcx.sess, it.span, E0093, + "unrecognized intrinsic function: `{}`", + *other) + .span_label(it.span, &format!("unrecognized intrinsic")) + .emit(); return; } }; diff --git a/src/test/compile-fail/E0093.rs b/src/test/compile-fail/E0093.rs index 9b23f6d984ee1..fdc48455a679c 100644 --- a/src/test/compile-fail/E0093.rs +++ b/src/test/compile-fail/E0093.rs @@ -10,7 +10,9 @@ #![feature(intrinsics)] extern "rust-intrinsic" { - fn foo(); //~ ERROR E0093 + fn foo(); + //~^ ERROR E0093 + //~| NOTE unrecognized intrinsic } fn main() {