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