Skip to content

Commit

Permalink
Rollup merge of rust-lang#35346 - DarkEld3r:e0093-formatting, r=jonat…
Browse files Browse the repository at this point in the history
…handturner

Update compiler error 0093 to use new error format

Addresses rust-lang#35230, Part of the rust-lang#35233 meta bug

r? @jonathandturner
  • Loading branch information
Jonathan Turner committed Aug 13, 2016
2 parents e64f688 + 127489a commit 58738a9
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 @@ -299,8 +299,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 58738a9

Please sign in to comment.