diff --git a/src/librustc_lint/builtin.rs b/src/librustc_lint/builtin.rs index 7f1a4b659edb4..c12ac501c45a2 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, };