Skip to content

Commit 58738a9

Browse files
author
Jonathan Turner
authored
Rollup merge of rust-lang#35346 - DarkEld3r:e0093-formatting, r=jonathandturner
Update compiler error 0093 to use new error format Addresses rust-lang#35230, Part of the rust-lang#35233 meta bug r? @jonathandturner
2 parents e64f688 + 127489a commit 58738a9

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/librustc_typeck/check/intrinsic.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,11 @@ pub fn check_intrinsic_type(ccx: &CrateCtxt, it: &hir::ForeignItem) {
299299
}
300300

301301
ref other => {
302-
span_err!(tcx.sess, it.span, E0093,
303-
"unrecognized intrinsic function: `{}`", *other);
302+
struct_span_err!(tcx.sess, it.span, E0093,
303+
"unrecognized intrinsic function: `{}`",
304+
*other)
305+
.span_label(it.span, &format!("unrecognized intrinsic"))
306+
.emit();
304307
return;
305308
}
306309
};

src/test/compile-fail/E0093.rs

Lines changed: 3 additions & 1 deletion
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)