Skip to content

Commit

Permalink
Rollup merge of rust-lang#73207 - GuillaumeGomez:cleanup-e0648, r=Dyl…
Browse files Browse the repository at this point in the history
…an-DPC

Clean up E0648 explanation

r? @Dylan-DPC
  • Loading branch information
Dylan-DPC authored Jun 11, 2020
2 parents c8a2f53 + dc230c0 commit df213d5
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/librustc_error_codes/error_codes/E0648.md
Original file line number Diff line number Diff line change
@@ -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() {}
```

0 comments on commit df213d5

Please sign in to comment.