Skip to content

Commit 127489a

Browse files
Update compiler error 0093 to use new error format
1 parent 545a3a9 commit 127489a

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/librustc_typeck/check/intrinsic.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,11 @@ pub fn check_intrinsic_type(ccx: &CrateCtxt, it: &hir::ForeignItem) {
297297
}
298298

299299
ref other => {
300-
span_err!(tcx.sess, it.span, E0093,
301-
"unrecognized intrinsic function: `{}`", *other);
300+
struct_span_err!(tcx.sess, it.span, E0093,
301+
"unrecognized intrinsic function: `{}`",
302+
*other)
303+
.span_label(it.span, &format!("unrecognized intrinsic"))
304+
.emit();
302305
return;
303306
}
304307
};

src/test/compile-fail/E0093.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010

1111
#![feature(intrinsics)]
1212
extern "rust-intrinsic" {
13-
fn foo(); //~ ERROR E0093
13+
fn foo();
14+
//~^ ERROR E0093
15+
//~| NOTE unrecognized intrinsic
1416
}
1517

1618
fn main() {

0 commit comments

Comments
 (0)