Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 65249a5

Browse files
committedAug 29, 2016
E0459 Update error format #35933
- Fixes #35933 - Part of #35233 r? @jonathandturner
1 parent acd3f79 commit 65249a5

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed
 

‎src/librustc_metadata/creader.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -977,8 +977,9 @@ impl<'a> LocalCrateReader<'a> {
977977
let n = match n {
978978
Some(n) => n,
979979
None => {
980-
span_err!(self.sess, m.span, E0459,
981-
"#[link(...)] specified without `name = \"foo\"`");
980+
struct_span_err!(self.sess, m.span, E0459,
981+
"#[link(...)] specified without `name = \"foo\"`")
982+
.span_label(m.span, &format!("missing `name` argument")).emit();
982983
InternedString::new("foo")
983984
}
984985
};

‎src/test/compile-fail/E0459.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

1111
#[link(kind = "dylib")] extern {} //~ ERROR E0459
12+
//~| NOTE missing `name` argument
1213

1314
fn main() {
1415
}

0 commit comments

Comments
 (0)
Please sign in to comment.