From dc230c06b226947a5a9980d2947118fd4a8ece9e Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Wed, 10 Jun 2020 11:44:32 +0200 Subject: [PATCH] Clean up E0648 explanation --- src/librustc_error_codes/error_codes/E0648.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/librustc_error_codes/error_codes/E0648.md b/src/librustc_error_codes/error_codes/E0648.md index 319bae103f3b3..d99dc19503ddb 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() {} +```