Skip to content

Commit cbc13c5

Browse files
Clean up E0754 explanation
1 parent 441fd22 commit cbc13c5

File tree

1 file changed

+5
-9
lines changed
  • src/librustc_error_codes/error_codes

1 file changed

+5
-9
lines changed

src/librustc_error_codes/error_codes/E0754.md

+5-9
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,27 @@
11
An non-ascii identifier was used in an invalid context.
22

3-
Erroneous code example:
3+
Erroneous code examples:
44

55
```compile_fail,E0754
66
# #![feature(non_ascii_idents)]
77
88
mod řųśť;
99
// ^ error!
10-
fn main() {}
11-
```
12-
13-
```compile_fail,E0754
14-
# #![feature(non_ascii_idents)]
1510
1611
#[no_mangle]
1712
fn řųśť() {}
1813
// ^ error!
14+
1915
fn main() {}
2016
```
2117

22-
Non-ascii can be used as module names if it is inline
23-
or a #\[path\] attribute is specified. For example:
18+
Non-ascii can be used as module names if it is inline or a `#[path]` attribute
19+
is specified. For example:
2420

2521
```
2622
# #![feature(non_ascii_idents)]
2723
28-
mod řųśť {
24+
mod řųśť { // ok!
2925
const IS_GREAT: bool = true;
3026
}
3127

0 commit comments

Comments
 (0)