Skip to content

Commit 612506b

Browse files
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 aef6971 + 127489a commit 612506b

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
@@ -301,8 +301,11 @@ pub fn check_intrinsic_type(ccx: &CrateCtxt, it: &hir::ForeignItem) {
301301
}
302302

303303
ref other => {
304-
span_err!(tcx.sess, it.span, E0093,
305-
"unrecognized intrinsic function: `{}`", *other);
304+
struct_span_err!(tcx.sess, it.span, E0093,
305+
"unrecognized intrinsic function: `{}`",
306+
*other)
307+
.span_label(it.span, &format!("unrecognized intrinsic"))
308+
.emit();
306309
return;
307310
}
308311
};

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)