about summary refs log tree commit diff
path: root/src/librustc_error_codes/error_codes
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2020-06-10 11:44:32 +0200
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2020-06-10 11:44:32 +0200
commitdc230c06b226947a5a9980d2947118fd4a8ece9e (patch)
treeac225495d8c2fbaeeae6903ebd55a857c36ce50e /src/librustc_error_codes/error_codes
parentccac43b86b559e01fa71179af1a838ab94559c75 (diff)
downloadrust-dc230c06b226947a5a9980d2947118fd4a8ece9e.tar.gz
rust-dc230c06b226947a5a9980d2947118fd4a8ece9e.zip
Clean up E0648 explanation
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() {}
+```