about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTshepang Lekhonkhobe <tshepang@gmail.com>2015-04-20 22:55:36 +0200
committerTshepang Lekhonkhobe <tshepang@gmail.com>2015-04-20 23:11:58 +0200
commit298a6e66579e5e56fbe2d67f9a4b92f6e1e58ccc (patch)
tree8072f9d59a1669403922a8bfcb503037e64e0b5d
parentc64feb63418fd05bd6e5adc6f9ad763aa6a594b1 (diff)
downloadrust-298a6e66579e5e56fbe2d67f9a4b92f6e1e58ccc.tar.gz
rust-298a6e66579e5e56fbe2d67f9a4b92f6e1e58ccc.zip
lint: explain the non-obvious need for a negative test
-rw-r--r--src/librustc_lint/builtin.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/librustc_lint/builtin.rs b/src/librustc_lint/builtin.rs
index 7f1a4b659ed..c12ac501c45 100644
--- a/src/librustc_lint/builtin.rs
+++ b/src/librustc_lint/builtin.rs
@@ -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,
                 };