about summary refs log tree commit diff
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev@gmail.com>2020-08-18 09:27:49 +0900
committerGitHub <noreply@github.com>2020-08-18 09:27:49 +0900
commit791768e8f6c0084e0db4fa46f43fb0101b238a38 (patch)
tree05e7a9691074422120705bd73d95fc510e4ad695
parent48da6758e568a68acb1be3a1ce6adef0aeea0665 (diff)
parent4fa69cb3ce468c94e8f1c5927212270e9bc74884 (diff)
downloadrust-791768e8f6c0084e0db4fa46f43fb0101b238a38.tar.gz
rust-791768e8f6c0084e0db4fa46f43fb0101b238a38.zip
Rollup merge of #75626 - GuillaumeGomez:cleanup-e0754, r=pickfire
Clean up E0754 explanation

r? @Dylan-DPC

cc @pickfire
-rw-r--r--src/librustc_error_codes/error_codes/E0754.md20
1 files changed, 7 insertions, 13 deletions
diff --git a/src/librustc_error_codes/error_codes/E0754.md b/src/librustc_error_codes/error_codes/E0754.md
index abdc01ed21a..57620bcd65c 100644
--- a/src/librustc_error_codes/error_codes/E0754.md
+++ b/src/librustc_error_codes/error_codes/E0754.md
@@ -1,31 +1,25 @@
 An non-ascii identifier was used in an invalid context.
 
-Erroneous code example:
+Erroneous code examples:
 
 ```compile_fail,E0754
 # #![feature(non_ascii_idents)]
 
-mod řųśť;
-// ^ error!
-fn main() {}
-```
-
-```compile_fail,E0754
-# #![feature(non_ascii_idents)]
+mod řųśť; // error!
 
 #[no_mangle]
-fn řųśť() {}
-// ^ error!
+fn řųśť() {} // error!
+
 fn main() {}
 ```
 
-Non-ascii can be used as module names if it is inline
-or a #\[path\] attribute is specified. For example:
+Non-ascii can be used as module names if it is inlined or if a `#[path]`
+attribute is specified. For example:
 
 ```
 # #![feature(non_ascii_idents)]
 
-mod řųśť {
+mod řųśť { // ok!
     const IS_GREAT: bool = true;
 }