about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorP1start <rewi-github@whanau.org>2014-07-19 00:45:17 +1200
committerP1start <rewi-github@whanau.org>2014-08-30 09:10:05 +1200
commitde7abd88244a9fe7033cb71e22af0601d1b811b9 (patch)
tree0f57eaeba2ecc2d72a618872a7e06885d5e611db /src/libstd
parentbd159d3867473ee43959706519066531d76af7ba (diff)
downloadrust-de7abd88244a9fe7033cb71e22af0601d1b811b9.tar.gz
rust-de7abd88244a9fe7033cb71e22af0601d1b811b9.zip
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]
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/dynamic_lib.rs2
-rw-r--r--src/libstd/os.rs2
-rw-r--r--src/libstd/rand/os.rs2
-rw-r--r--src/libstd/rt/backtrace.rs6
4 files changed, 6 insertions, 6 deletions
diff --git a/src/libstd/dynamic_lib.rs b/src/libstd/dynamic_lib.rs
index 16c00d76c54..eee3e81f5fc 100644
--- a/src/libstd/dynamic_lib.rs
+++ b/src/libstd/dynamic_lib.rs
@@ -328,7 +328,7 @@ pub mod dl {
         FreeLibrary(handle as *mut libc::c_void); ()
     }
 
-    #[allow(non_snake_case_functions)]
+    #[allow(non_snake_case)]
     extern "system" {
         fn SetLastError(error: libc::size_t);
         fn LoadLibraryW(name: *const libc::c_void) -> *mut libc::c_void;
diff --git a/src/libstd/os.rs b/src/libstd/os.rs
index f452f8b23e7..ea278d55db9 100644
--- a/src/libstd/os.rs
+++ b/src/libstd/os.rs
@@ -29,7 +29,7 @@
 #![experimental]
 
 #![allow(missing_doc)]
-#![allow(non_snake_case_functions)]
+#![allow(non_snake_case)]
 
 use clone::Clone;
 use collections::{Collection, MutableSeq};
diff --git a/src/libstd/rand/os.rs b/src/libstd/rand/os.rs
index 07ad08e1b3c..95be3191bab 100644
--- a/src/libstd/rand/os.rs
+++ b/src/libstd/rand/os.rs
@@ -161,7 +161,7 @@ mod imp {
     static CRYPT_VERIFYCONTEXT: DWORD = 0xF0000000;
     static NTE_BAD_SIGNATURE: DWORD = 0x80090006;
 
-    #[allow(non_snake_case_functions)]
+    #[allow(non_snake_case)]
     extern "system" {
         fn CryptAcquireContextA(phProv: *mut HCRYPTPROV,
                                 pszContainer: LPCSTR,
diff --git a/src/libstd/rt/backtrace.rs b/src/libstd/rt/backtrace.rs
index 58b3179a297..aadc9178e1a 100644
--- a/src/libstd/rt/backtrace.rs
+++ b/src/libstd/rt/backtrace.rs
@@ -543,7 +543,7 @@ mod imp {
     /// iOS doesn't use all of them it but adding more
     /// platform-specific configs pollutes the code too much
     #[allow(non_camel_case_types)]
-    #[allow(non_snake_case_functions)]
+    #[allow(non_snake_case)]
     #[allow(dead_code)]
     mod uw {
         use libc;
@@ -657,7 +657,7 @@ mod imp {
 /// copy of that function in my mingw install (maybe it was broken?). Instead,
 /// this takes the route of using StackWalk64 in order to walk the stack.
 #[cfg(windows)]
-#[allow(dead_code, uppercase_variables)]
+#[allow(dead_code, non_snake_case)]
 mod imp {
     use c_str::CString;
     use core_collections::Collection;
@@ -674,7 +674,7 @@ mod imp {
     use str::StrSlice;
     use dynamic_lib::DynamicLibrary;
 
-    #[allow(non_snake_case_functions)]
+    #[allow(non_snake_case)]
     extern "system" {
         fn GetCurrentProcess() -> libc::HANDLE;
         fn GetCurrentThread() -> libc::HANDLE;