about summary refs log tree commit diff
path: root/src/librustc_error_codes/error_codes
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2020-06-11 19:04:18 +0200
committerGitHub <noreply@github.com>2020-06-11 19:04:18 +0200
commit6b418b307c0222ecceb3d82b46621a377b592c79 (patch)
treefbfc7dff5a6c2e82be0464a9c4148ce6cf196291 /src/librustc_error_codes/error_codes
parent84b9145076657579afb09c04b8653bf25b86f59d (diff)
parentdc230c06b226947a5a9980d2947118fd4a8ece9e (diff)
downloadrust-6b418b307c0222ecceb3d82b46621a377b592c79.tar.gz
rust-6b418b307c0222ecceb3d82b46621a377b592c79.zip
Rollup merge of #73207 - GuillaumeGomez:cleanup-e0648, r=Dylan-DPC
Clean up E0648 explanation

r? @Dylan-DPC
Diffstat (limited to 'src/librustc_error_codes/error_codes')
-rw-r--r--src/librustc_error_codes/error_codes/E0648.md11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/librustc_error_codes/error_codes/E0648.md b/src/librustc_error_codes/error_codes/E0648.md
index 319bae103f3..d99dc19503d 100644
--- a/src/librustc_error_codes/error_codes/E0648.md
+++ b/src/librustc_error_codes/error_codes/E0648.md
@@ -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() {}
+```