Add backticks to E0558
This commit is contained in:
parent
74609bca80
commit
82803fd9bd
|
@ -48,8 +48,3 @@ unsafe { simd_add(i32x2(0, 0), i32x2(1, 2)); } // ok!
|
||||||
"##,
|
"##,
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
register_diagnostics! {
|
|
||||||
E0558
|
|
||||||
}
|
|
||||||
|
|
|
@ -1909,7 +1909,7 @@ fn codegen_fn_attrs<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, id: DefId) -> Codegen
|
||||||
codegen_fn_attrs.export_name = Some(s);
|
codegen_fn_attrs.export_name = Some(s);
|
||||||
} else {
|
} else {
|
||||||
struct_span_err!(tcx.sess, attr.span, E0558,
|
struct_span_err!(tcx.sess, attr.span, E0558,
|
||||||
"export_name attribute has invalid format")
|
"`export_name` attribute has invalid format")
|
||||||
.span_label(attr.span, "did you mean #[export_name=\"*\"]?")
|
.span_label(attr.span, "did you mean #[export_name=\"*\"]?")
|
||||||
.emit();
|
.emit();
|
||||||
}
|
}
|
||||||
|
|
|
@ -3709,7 +3709,7 @@ The `export_name` attribute was malformed.
|
||||||
Erroneous code example:
|
Erroneous code example:
|
||||||
|
|
||||||
```ignore (error-emitted-at-codegen-which-cannot-be-handled-by-compile_fail)
|
```ignore (error-emitted-at-codegen-which-cannot-be-handled-by-compile_fail)
|
||||||
#[export_name] // error: export_name attribute has invalid format
|
#[export_name] // error: `export_name` attribute has invalid format
|
||||||
pub fn something() {}
|
pub fn something() {}
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
error[E0558]: export_name attribute has invalid format
|
error[E0558]: `export_name` attribute has invalid format
|
||||||
--> $DIR/E0558.rs:11:1
|
--> $DIR/E0558.rs:11:1
|
||||||
|
|
|
|
||||||
LL | #[export_name]
|
LL | #[export_name]
|
||||||
|
|
Loading…
Reference in New Issue