Rollup merge of #36223 - abhiQmar:e0558-formatting, r=jonathandturner
Update compiler error E0558 to use new error format Fixes #36196 part of #35233 r? @jonathandturner
This commit is contained in:
@@ -438,8 +438,9 @@ pub fn find_export_name_attr(diag: &Handler, attrs: &[Attribute]) -> Option<Inte
|
|||||||
} else {
|
} else {
|
||||||
struct_span_err!(diag, attr.span, E0558,
|
struct_span_err!(diag, attr.span, E0558,
|
||||||
"export_name attribute has invalid format")
|
"export_name attribute has invalid format")
|
||||||
.help("use #[export_name=\"*\"]")
|
.span_label(attr.span,
|
||||||
.emit();
|
&format!("did you mean #[export_name=\"*\"]?"))
|
||||||
|
.emit();
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -8,7 +8,10 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#[export_name] //~ ERROR E0558
|
#[export_name]
|
||||||
|
//~^ ERROR E0558
|
||||||
|
//~| NOTE did you mean #[export_name="*"]?
|
||||||
|
|
||||||
pub fn something() {}
|
pub fn something() {}
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
|||||||
Reference in New Issue
Block a user