]> git.proxmox.com Git - rustc.git/blame - src/librustc_error_codes/error_codes/E0754.md
New upstream version 1.47.0+dfsg1
[rustc.git] / src / librustc_error_codes / error_codes / E0754.md
CommitLineData
f9f354fc
XL
1An non-ascii identifier was used in an invalid context.
2
3dfed10e 3Erroneous code examples:
f9f354fc
XL
4
5```compile_fail,E0754
6# #![feature(non_ascii_idents)]
7
3dfed10e 8mod řųśť; // error!
f9f354fc
XL
9
10#[no_mangle]
3dfed10e
XL
11fn řųśť() {} // error!
12
f9f354fc
XL
13fn main() {}
14```
15
3dfed10e
XL
16Non-ascii can be used as module names if it is inlined or if a `#[path]`
17attribute is specified. For example:
f9f354fc
XL
18
19```
20# #![feature(non_ascii_idents)]
21
3dfed10e 22mod řųśť { // ok!
f9f354fc
XL
23 const IS_GREAT: bool = true;
24}
25
26fn main() {}
27```