about summary refs log tree commit diff
path: root/src/librustc_error_codes/error_codes
diff options
context:
space:
mode:
Diffstat (limited to 'src/librustc_error_codes/error_codes')
-rw-r--r--src/librustc_error_codes/error_codes/E0754.md33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/librustc_error_codes/error_codes/E0754.md b/src/librustc_error_codes/error_codes/E0754.md
new file mode 100644
index 00000000000..abdc01ed21a
--- /dev/null
+++ b/src/librustc_error_codes/error_codes/E0754.md
@@ -0,0 +1,33 @@
+An non-ascii identifier was used in an invalid context.
+
+Erroneous code example:
+
+```compile_fail,E0754
+# #![feature(non_ascii_idents)]
+
+mod řųśť;
+// ^ error!
+fn main() {}
+```
+
+```compile_fail,E0754
+# #![feature(non_ascii_idents)]
+
+#[no_mangle]
+fn řųśť() {}
+// ^ error!
+fn main() {}
+```
+
+Non-ascii can be used as module names if it is inline
+or a #\[path\] attribute is specified. For example:
+
+```
+# #![feature(non_ascii_idents)]
+
+mod řųśť {
+    const IS_GREAT: bool = true;
+}
+
+fn main() {}
+```