Skip to content

Commit 298a6e6

Browse files
committed
lint: explain the non-obvious need for a negative test
1 parent c64feb6 commit 298a6e6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/librustc_lint/builtin.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -923,6 +923,8 @@ impl NonSnakeCase {
923923
allow_underscore = match c {
924924
'_' if !allow_underscore => return false,
925925
'_' => false,
926+
// It would be more obvious to use `c.is_lowercase()`,
927+
// but some characters do not have a lowercase form
926928
c if !c.is_uppercase() => true,
927929
_ => return false,
928930
};

0 commit comments

Comments
 (0)