Skip to content

Commit

Permalink
lint: explain the non-obvious need for a negative test
Browse files Browse the repository at this point in the history
  • Loading branch information
tshepang committed Apr 20, 2015
1 parent c64feb6 commit 298a6e6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/librustc_lint/builtin.rs
Expand Up @@ -923,6 +923,8 @@ impl NonSnakeCase {
allow_underscore = match c {
'_' if !allow_underscore => return false,
'_' => false,
// It would be more obvious to use `c.is_lowercase()`,
// but some characters do not have a lowercase form
c if !c.is_uppercase() => true,
_ => return false,
};
Expand Down

0 comments on commit 298a6e6

Please sign in to comment.