Skip to content

Commit dc230c0

Browse files
Clean up E0648 explanation
1 parent ccac43b commit dc230c0

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)