]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lint/lint-nonstandard-style-unicode-2.rs
Merge commit 'b40ea209e7f14c8193ddfc98143967b6a2f4f5c9' into clippyup
[rust.git] / src / test / ui / lint / lint-nonstandard-style-unicode-2.rs
1 #![allow(dead_code)]
2
3 #![forbid(non_snake_case)]
4 #![feature(non_ascii_idents)]
5
6 // Some scripts (e.g., hiragana) don't have a concept of
7 // upper/lowercase
8
9 // 2. non_snake_case
10
11 // Can only use non-uppercase letters.
12 // So this works:
13
14 fn 编程() {}
15
16 // but this doesn't:
17
18 fn Ц() {}
19 //~^ ERROR function `Ц` should have a snake case name
20
21 // besides this, you cannot use continuous underscores in the middle
22
23 fn 分__隔() {}
24 //~^ ERROR function `分__隔` should have a snake case name
25
26 // but you can use them both at the beginning and at the end.
27
28 fn _______不_连_续_的_存_在_______() {}
29
30 fn main() {}