Skip to content

Commit

Permalink
Update compiler error 0093 to use new error format
Browse files Browse the repository at this point in the history
  • Loading branch information
stanislav-tkach committed Aug 9, 2016
1 parent 545a3a9 commit 127489a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/librustc_typeck/check/intrinsic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
};
Expand Down
4 changes: 3 additions & 1 deletion src/test/compile-fail/E0093.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@

#![feature(intrinsics)]
extern "rust-intrinsic" {
fn foo(); //~ ERROR E0093
fn foo();
//~^ ERROR E0093
//~| NOTE unrecognized intrinsic
}

fn main() {
Expand Down

0 comments on commit 127489a

Please sign in to comment.