Skip to content

Commit

Permalink
Update compiler error E0558 to use new error format
Browse files Browse the repository at this point in the history
Fixes #36196 part of #35233
  • Loading branch information
abhiQmar committed Sep 2, 2016
1 parent 147371f commit 2f2df2a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/libsyntax/attr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ pub fn find_export_name_attr(diag: &Handler, attrs: &[Attribute]) -> Option<Inte
} else {
struct_span_err!(diag, attr.span, E0558,
"export_name attribute has invalid format")
.help("use #[export_name=\"*\"]")
.span_label(attr.span, &format!("did you mean #[export_name=\"*\"]?"))
.emit();
None
}
Expand Down
5 changes: 4 additions & 1 deletion src/test/compile-fail/E0558.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#[export_name] //~ ERROR E0558
#[export_name]
//~^ ERROR E0558
//~| NOTE did you mean #[export_name="*"]?

pub fn something() {}

fn main() {}

0 comments on commit 2f2df2a

Please sign in to comment.