Skip to content

Commit 791768e

Browse files
authored
Rollup merge of rust-lang#75626 - GuillaumeGomez:cleanup-e0754, r=pickfire
Clean up E0754 explanation r? @Dylan-DPC cc @pickfire
2 parents 48da675 + 4fa69cb commit 791768e

File tree

1 file changed

+7
-13
lines changed
  • src/librustc_error_codes/error_codes

1 file changed

+7
-13
lines changed

src/librustc_error_codes/error_codes/E0754.md

+7-13
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,25 @@
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
8-
mod řųśť;
9-
// ^ error!
10-
fn main() {}
11-
```
12-
13-
```compile_fail,E0754
14-
# #![feature(non_ascii_idents)]
8+
mod řųśť; // error!
159
1610
#[no_mangle]
17-
fn řųśť() {}
18-
// ^ error!
11+
fn řųśť() {} // error!
12+
1913
fn main() {}
2014
```
2115

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

2519
```
2620
# #![feature(non_ascii_idents)]
2721
28-
mod řųśť {
22+
mod řųśť { // ok!
2923
const IS_GREAT: bool = true;
3024
}
3125

0 commit comments

Comments
 (0)