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() {