E0459 Update error format #35933

- Fixes #35933
- Part of #35233

r? @jonathandturner
This commit is contained in:
Gavin Baker 2016-08-28 22:55:39 +10:00
parent acd3f796d2
commit 65249a5431
2 changed files with 4 additions and 2 deletions

View file

@ -977,8 +977,9 @@ impl<'a> LocalCrateReader<'a> {
let n = match n {
Some(n) => n,
None => {
span_err!(self.sess, m.span, E0459,
"#[link(...)] specified without `name = \"foo\"`");
struct_span_err!(self.sess, m.span, E0459,
"#[link(...)] specified without `name = \"foo\"`")
.span_label(m.span, &format!("missing `name` argument")).emit();
InternedString::new("foo")
}
};

View file

@ -9,6 +9,7 @@
// except according to those terms.
#[link(kind = "dylib")] extern {} //~ ERROR E0459
//~| NOTE missing `name` argument
fn main() {
}