Skip to content

Commit

Permalink
E0458 Update error format #35932
Browse files Browse the repository at this point in the history
    - Fixes #35932
    - Part of #35233

    r? @jonathandturner
  • Loading branch information
gavinb committed Aug 29, 2016
1 parent 65249a5 commit 0412fa8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/librustc_metadata/creader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -965,8 +965,9 @@ impl<'a> LocalCrateReader<'a> {
Some("dylib") => cstore::NativeUnknown,
Some("framework") => cstore::NativeFramework,
Some(k) => {
span_err!(self.sess, m.span, E0458,
"unknown kind: `{}`", k);
struct_span_err!(self.sess, m.span, E0458,
"unknown kind: `{}`", k)
.span_label(m.span, &format!("unknown kind")).emit();
cstore::NativeUnknown
}
None => cstore::NativeUnknown
Expand Down
4 changes: 3 additions & 1 deletion src/test/compile-fail/E0458.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
// except according to those terms.

#[link(kind = "wonderful_unicorn")] extern {} //~ ERROR E0458
//~^ ERROR E0459
//~| NOTE unknown kind
//~| ERROR E0459
//~| NOTE missing `name` argument

fn main() {
}

0 comments on commit 0412fa8

Please sign in to comment.