From de7abd88244a9fe7033cb71e22af0601d1b811b9 Mon Sep 17 00:00:00 2001 From: P1start Date: Sat, 19 Jul 2014 00:45:17 +1200 Subject: Unify non-snake-case lints and non-uppercase statics lints This unifies the `non_snake_case_functions` and `uppercase_variables` lints into one lint, `non_snake_case`. It also now checks for non-snake-case modules. This also extends the non-camel-case types lint to check type parameters, and merges the `non_uppercase_pattern_statics` lint into the `non_uppercase_statics` lint. Because the `uppercase_variables` lint is now part of the `non_snake_case` lint, all non-snake-case variables that start with lowercase characters (such as `fooBar`) will now trigger the `non_snake_case` lint. New code should be updated to use the new `non_snake_case` lint instead of the previous `non_snake_case_functions` and `uppercase_variables` lints. All use of the `non_uppercase_pattern_statics` should be replaced with the `non_uppercase_statics` lint. Any code that previously contained non-snake-case module or variable names should be updated to use snake case names or disable the `non_snake_case` lint. Any code with non-camel-case type parameters should be changed to use camel case or disable the `non_camel_case_types` lint. [breaking-change] --- src/libunicode/tables.rs | 2 +- src/libunicode/u_char.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/libunicode') diff --git a/src/libunicode/tables.rs b/src/libunicode/tables.rs index d6010cd8d7b..135b267262c 100644 --- a/src/libunicode/tables.rs +++ b/src/libunicode/tables.rs @@ -10,7 +10,7 @@ // NOTE: The following code was generated by "src/etc/unicode.py", do not edit directly -#![allow(missing_doc, non_uppercase_statics, non_snake_case_functions)] +#![allow(missing_doc, non_uppercase_statics, non_snake_case)] fn bsearch_range_table(c: char, r: &'static [(char,char)]) -> bool { use core::cmp::{Equal, Less, Greater}; diff --git a/src/libunicode/u_char.rs b/src/libunicode/u_char.rs index 0f75cf86c18..91e7589b8ca 100644 --- a/src/libunicode/u_char.rs +++ b/src/libunicode/u_char.rs @@ -33,7 +33,7 @@ pub fn is_alphabetic(c: char) -> bool { /// 'XID_Start' is a Unicode Derived Property specified in /// [UAX #31](http://unicode.org/reports/tr31/#NFKC_Modifications), /// mostly similar to ID_Start but modified for closure under NFKx. -#[allow(non_snake_case_functions)] +#[allow(non_snake_case)] pub fn is_XID_start(c: char) -> bool { derived_property::XID_Start(c) } /// Returns whether the specified `char` satisfies the 'XID_Continue' Unicode property @@ -41,7 +41,7 @@ pub fn is_XID_start(c: char) -> bool { derived_property::XID_Start(c) } /// 'XID_Continue' is a Unicode Derived Property specified in /// [UAX #31](http://unicode.org/reports/tr31/#NFKC_Modifications), /// mostly similar to 'ID_Continue' but modified for closure under NFKx. -#[allow(non_snake_case_functions)] +#[allow(non_snake_case)] pub fn is_XID_continue(c: char) -> bool { derived_property::XID_Continue(c) } /// @@ -174,7 +174,7 @@ pub trait UnicodeChar { /// 'XID_Start' is a Unicode Derived Property specified in /// [UAX #31](http://unicode.org/reports/tr31/#NFKC_Modifications), /// mostly similar to ID_Start but modified for closure under NFKx. - #[allow(non_snake_case_functions)] + #[allow(non_snake_case)] fn is_XID_start(&self) -> bool; /// Returns whether the specified `char` satisfies the 'XID_Continue' @@ -183,7 +183,7 @@ pub trait UnicodeChar { /// 'XID_Continue' is a Unicode Derived Property specified in /// [UAX #31](http://unicode.org/reports/tr31/#NFKC_Modifications), /// mostly similar to 'ID_Continue' but modified for closure under NFKx. - #[allow(non_snake_case_functions)] + #[allow(non_snake_case)] fn is_XID_continue(&self) -> bool; -- cgit 1.4.1-3-g733a5