Rollup merge of #73207 - GuillaumeGomez:cleanup-e0648, r=Dylan-DPC

Clean up E0648 explanation

r? @Dylan-DPC
This commit is contained in:
Dylan DPC 2020-06-11 19:04:18 +02:00 committed by GitHub
commit 6b418b307c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,15 @@
`export_name` attributes may not contain null characters (`\0`).
An `export_name` attribute contains null characters (`\0`).
Erroneous code example:
```compile_fail,E0648
#[export_name="\0foo"] // error: `export_name` may not contain null characters
pub fn bar() {}
```
To fix this error, remove the null characters:
```
#[export_name="foo"] // ok!
pub fn bar() {}
```