core: warn(non_camel_case_types) everywhere, with few exceptions
This commit is contained in:
parent
a80b7dc709
commit
117aa8cfee
7 changed files with 9 additions and 55 deletions
|
@ -32,6 +32,8 @@
|
|||
#[no_core];
|
||||
|
||||
#[deny(vecs_implicitly_copyable)];
|
||||
// XXX: Switch to deny after snapshot
|
||||
#[warn(non_camel_case_types)];
|
||||
|
||||
export int, i8, i16, i32, i64;
|
||||
export uint, u8, u16, u32, u64;
|
||||
|
@ -71,7 +73,6 @@ export priv;
|
|||
// Built-in-type support modules
|
||||
|
||||
/// Operations and constants for `int`
|
||||
#[warn(non_camel_case_types)]
|
||||
#[path = "int-template"]
|
||||
mod int {
|
||||
import inst::{ hash, pow };
|
||||
|
@ -81,7 +82,6 @@ mod int {
|
|||
}
|
||||
|
||||
/// Operations and constants for `i8`
|
||||
#[warn(non_camel_case_types)]
|
||||
#[path = "int-template"]
|
||||
mod i8 {
|
||||
#[path = "i8.rs"]
|
||||
|
@ -89,7 +89,6 @@ mod i8 {
|
|||
}
|
||||
|
||||
/// Operations and constants for `i16`
|
||||
#[warn(non_camel_case_types)]
|
||||
#[path = "int-template"]
|
||||
mod i16 {
|
||||
#[path = "i16.rs"]
|
||||
|
@ -97,7 +96,6 @@ mod i16 {
|
|||
}
|
||||
|
||||
/// Operations and constants for `i32`
|
||||
#[warn(non_camel_case_types)]
|
||||
#[path = "int-template"]
|
||||
mod i32 {
|
||||
#[path = "i32.rs"]
|
||||
|
@ -105,7 +103,6 @@ mod i32 {
|
|||
}
|
||||
|
||||
/// Operations and constants for `i64`
|
||||
#[warn(non_camel_case_types)]
|
||||
#[path = "int-template"]
|
||||
mod i64 {
|
||||
#[path = "i64.rs"]
|
||||
|
@ -113,7 +110,6 @@ mod i64 {
|
|||
}
|
||||
|
||||
/// Operations and constants for `uint`
|
||||
#[warn(non_camel_case_types)]
|
||||
#[path = "uint-template"]
|
||||
mod uint {
|
||||
import inst::{
|
||||
|
@ -128,7 +124,6 @@ mod uint {
|
|||
}
|
||||
|
||||
/// Operations and constants for `u8`
|
||||
#[warn(non_camel_case_types)]
|
||||
#[path = "uint-template"]
|
||||
mod u8 {
|
||||
import inst::is_ascii;
|
||||
|
@ -139,7 +134,6 @@ mod u8 {
|
|||
}
|
||||
|
||||
/// Operations and constants for `u16`
|
||||
#[warn(non_camel_case_types)]
|
||||
#[path = "uint-template"]
|
||||
mod u16 {
|
||||
#[path = "u16.rs"]
|
||||
|
@ -147,7 +141,6 @@ mod u16 {
|
|||
}
|
||||
|
||||
/// Operations and constants for `u32`
|
||||
#[warn(non_camel_case_types)]
|
||||
#[path = "uint-template"]
|
||||
mod u32 {
|
||||
#[path = "u32.rs"]
|
||||
|
@ -155,7 +148,6 @@ mod u32 {
|
|||
}
|
||||
|
||||
/// Operations and constants for `u64`
|
||||
#[warn(non_camel_case_types)]
|
||||
#[path = "uint-template"]
|
||||
mod u64 {
|
||||
#[path = "u64.rs"]
|
||||
|
@ -163,48 +155,29 @@ mod u64 {
|
|||
}
|
||||
|
||||
|
||||
#[warn(non_camel_case_types)]
|
||||
mod box;
|
||||
#[warn(non_camel_case_types)]
|
||||
mod char;
|
||||
#[warn(non_camel_case_types)]
|
||||
mod float;
|
||||
#[warn(non_camel_case_types)]
|
||||
mod f32;
|
||||
#[warn(non_camel_case_types)]
|
||||
mod f64;
|
||||
#[warn(non_camel_case_types)]
|
||||
mod str;
|
||||
#[warn(non_camel_case_types)]
|
||||
mod ptr;
|
||||
#[warn(non_camel_case_types)]
|
||||
mod vec;
|
||||
#[warn(non_camel_case_types)]
|
||||
mod at_vec;
|
||||
#[warn(non_camel_case_types)]
|
||||
mod bool;
|
||||
#[warn(non_camel_case_types)]
|
||||
mod tuple;
|
||||
#[warn(non_camel_case_types)]
|
||||
mod unit;
|
||||
#[warn(non_camel_case_types)]
|
||||
mod uniq;
|
||||
|
||||
// Ubiquitous-utility-type modules
|
||||
|
||||
#[cfg(notest)]
|
||||
mod ops;
|
||||
#[warn(non_camel_case_types)]
|
||||
mod cmp;
|
||||
#[warn(non_camel_case_types)]
|
||||
mod num;
|
||||
#[warn(non_camel_case_types)]
|
||||
mod hash;
|
||||
#[warn(non_camel_case_types)]
|
||||
mod either;
|
||||
#[warn(non_camel_case_types)]
|
||||
mod iter;
|
||||
#[warn(non_camel_case_types)]
|
||||
mod logging;
|
||||
mod option;
|
||||
#[path="iter-trait"]
|
||||
|
@ -213,60 +186,41 @@ mod option_iter {
|
|||
mod inst;
|
||||
}
|
||||
mod result;
|
||||
#[warn(non_camel_case_types)]
|
||||
mod to_str;
|
||||
#[warn(non_camel_case_types)]
|
||||
mod to_bytes;
|
||||
#[warn(non_camel_case_types)]
|
||||
mod util;
|
||||
|
||||
// Data structure modules
|
||||
|
||||
#[warn(non_camel_case_types)]
|
||||
mod dvec;
|
||||
#[path="iter-trait"]
|
||||
#[warn(non_camel_case_types)]
|
||||
mod dvec_iter {
|
||||
#[path = "dvec.rs"]
|
||||
mod inst;
|
||||
}
|
||||
#[warn(non_camel_case_types)]
|
||||
mod dlist;
|
||||
#[path="iter-trait"]
|
||||
#[warn(non_camel_case_types)]
|
||||
mod dlist_iter {
|
||||
#[path ="dlist.rs"]
|
||||
mod inst;
|
||||
}
|
||||
#[warn(non_camel_case_types)]
|
||||
mod send_map;
|
||||
|
||||
// Concurrency
|
||||
#[warn(non_camel_case_types)]
|
||||
mod comm;
|
||||
#[warn(non_camel_case_types)]
|
||||
mod task;
|
||||
//#[warn(non_camel_ase_types)] pipec code continues to trip this warning
|
||||
mod future;
|
||||
#[warn(non_camel_case_types)]
|
||||
mod pipes;
|
||||
|
||||
// Runtime and language-primitive support
|
||||
|
||||
#[warn(non_camel_case_types)]
|
||||
mod io;
|
||||
mod libc;
|
||||
#[warn(non_camel_case_types)]
|
||||
mod os;
|
||||
#[warn(non_camel_case_types)]
|
||||
mod path;
|
||||
#[warn(non_camel_case_types)]
|
||||
mod rand;
|
||||
#[warn(non_camel_case_types)]
|
||||
mod run;
|
||||
#[warn(non_camel_case_types)]
|
||||
mod sys;
|
||||
#[warn(non_camel_case_types)]
|
||||
mod unsafe;
|
||||
|
||||
mod managed;
|
||||
|
@ -284,13 +238,9 @@ mod rt;
|
|||
|
||||
// For internal use, not exported
|
||||
|
||||
#[warn(non_camel_case_types)]
|
||||
mod unicode;
|
||||
#[warn(non_camel_case_types)]
|
||||
mod priv;
|
||||
#[warn(non_camel_case_types)]
|
||||
mod cmath;
|
||||
#[warn(non_camel_case_types)]
|
||||
mod stackwalk;
|
||||
|
||||
// Local Variables:
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#[doc(hidden)];
|
||||
#[allow(non_camel_case_types)];
|
||||
|
||||
/*
|
||||
Syntax Extension: fmt
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#[allow(non_camel_case_types)]
|
||||
type IMPL_T<A> = Option<A>;
|
||||
|
||||
pure fn EACH<A>(self: IMPL_T<A>, f: fn(A) -> bool) {
|
||||
|
|
|
@ -9,7 +9,6 @@ mutation when the data structure should be immutable.
|
|||
|
||||
*/
|
||||
|
||||
#[forbid(non_camel_case_types)];
|
||||
#[forbid(deprecated_mode)];
|
||||
#[forbid(deprecated_pattern)];
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
// Core operators and kinds.
|
||||
|
||||
#[allow(non_camel_case_types)];
|
||||
|
||||
#[cfg(notest)]
|
||||
#[lang="const"]
|
||||
trait const {
|
||||
|
|
|
@ -290,14 +290,14 @@ fn test_unwrap_str() {
|
|||
|
||||
#[test]
|
||||
fn test_unwrap_resource() {
|
||||
struct r {
|
||||
struct R {
|
||||
let i: @mut int;
|
||||
new(i: @mut int) { self.i = i; }
|
||||
drop { *(self.i) += 1; }
|
||||
}
|
||||
let i = @mut 0;
|
||||
{
|
||||
let x = r(i);
|
||||
let x = R(i);
|
||||
let opt = Some(x);
|
||||
let _y = unwrap(opt);
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ import libc::c_void;
|
|||
import libc::size_t;
|
||||
import libc::uintptr_t;
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
type rust_task = c_void;
|
||||
|
||||
extern mod rustrt {
|
||||
|
|
Loading…
Add table
Reference in a new issue