Update compiler error E0558 to use new error format

Fixes #36196 part of #35233
This commit is contained in:
Abhishek Kumar 2016-09-02 02:21:53 +05:30
parent 147371f58f
commit 18434f9457
2 changed files with 7 additions and 3 deletions

View File

@ -438,8 +438,9 @@ 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=\"*\"]")
.emit();
.span_label(attr.span,
&format!("did you mean #[export_name=\"*\"]?"))
.emit();
None
}
} else {

View File

@ -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() {}