Skip to content

Commit 6b418b3

Browse files
authored
Rollup merge of rust-lang#73207 - GuillaumeGomez:cleanup-e0648, r=Dylan-DPC
Clean up E0648 explanation r? @Dylan-DPC
2 parents 84b9145 + dc230c0 commit 6b418b3

File tree

1 file changed

+10
-1
lines changed
  • src/librustc_error_codes/error_codes

1 file changed

+10
-1
lines changed
+10-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
1-
`export_name` attributes may not contain null characters (`\0`).
1+
An `export_name` attribute contains null characters (`\0`).
2+
3+
Erroneous code example:
24

35
```compile_fail,E0648
46
#[export_name="\0foo"] // error: `export_name` may not contain null characters
57
pub fn bar() {}
68
```
9+
10+
To fix this error, remove the null characters:
11+
12+
```
13+
#[export_name="foo"] // ok!
14+
pub fn bar() {}
15+
```

0 commit comments

Comments
 (0)