summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_error_codes/src/error_codes/E0754.md
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_error_codes/src/error_codes/E0754.md')
-rw-r--r--compiler/rustc_error_codes/src/error_codes/E0754.md24
1 files changed, 24 insertions, 0 deletions
diff --git a/compiler/rustc_error_codes/src/error_codes/E0754.md b/compiler/rustc_error_codes/src/error_codes/E0754.md
new file mode 100644
index 000000000..acddb69aa
--- /dev/null
+++ b/compiler/rustc_error_codes/src/error_codes/E0754.md
@@ -0,0 +1,24 @@
+A non-ASCII identifier was used in an invalid context.
+
+Erroneous code examples:
+
+```compile_fail,E0754
+
+mod řųśť; // error!
+
+#[no_mangle]
+fn řųśť() {} // error!
+
+fn main() {}
+```
+
+Non-ASCII can be used as module names if it is inlined or if a `#[path]`
+attribute is specified. For example:
+
+```
+mod řųśť { // ok!
+ const IS_GREAT: bool = true;
+}
+
+fn main() {}
+```