You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test.rs:8:1: 10:2 warning: function `を` should have a snake case name such as `を`, #[warn(non_snake_case)] on by default
test.rs:8 fn を(i: i32) -> i32 {
test.rs:9 i + 5
test.rs:10 }
The text was updated successfully, but these errors were encountered:
huonw
added
the
A-lints
Area: Lints (warnings about flaws in source code) such as unused_mut.
label
Jan 29, 2015
The reason is that some scripts in Unicode (such as kana) have no associated case to them (i.e. they are no-case) and the lint only allows lowercase codepoints.
This is E-easy material, but it is unclear whether the lint should just outright accept any non-uppercase codepoint or we should refine the error message to not have “such as を” suggestion if the lint is triggered by no-case codepoints.
EDIT: I recall some other programming language compiler opting to keep emiting a warning if no-case codepoints are present in snake_case identifiers, but I don’t quite recall which language it was.
nagisa
added a commit
to nagisa/rust
that referenced
this issue
Jan 29, 2015
An alternative to rust-lang#21749.
This also refactors the naming lint code a little bit and slightly rephrases some warnings (`uppercase` → `upper case`).
Closesrust-lang#21735.
Sample code (uses Hiragana を as an identifier)
A warning:
The text was updated successfully, but these errors were encountered: