Skip to content

Commit 0412fa8

Browse files
committed
E0458 Update error format #35932
- Fixes #35932 - Part of #35233 r? @jonathandturner
1 parent 65249a5 commit 0412fa8

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/librustc_metadata/creader.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -965,8 +965,9 @@ impl<'a> LocalCrateReader<'a> {
965965
Some("dylib") => cstore::NativeUnknown,
966966
Some("framework") => cstore::NativeFramework,
967967
Some(k) => {
968-
span_err!(self.sess, m.span, E0458,
969-
"unknown kind: `{}`", k);
968+
struct_span_err!(self.sess, m.span, E0458,
969+
"unknown kind: `{}`", k)
970+
.span_label(m.span, &format!("unknown kind")).emit();
970971
cstore::NativeUnknown
971972
}
972973
None => cstore::NativeUnknown

src/test/compile-fail/E0458.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
// except according to those terms.
1010

1111
#[link(kind = "wonderful_unicorn")] extern {} //~ ERROR E0458
12-
//~^ ERROR E0459
12+
//~| NOTE unknown kind
13+
//~| ERROR E0459
14+
//~| NOTE missing `name` argument
1315

1416
fn main() {
1517
}

0 commit comments

Comments
 (0)