about summary refs log tree commit diff
diff options
context:
space:
mode:
authormr.Shu <mr@shu.io>2014-02-10 15:36:31 +0100
committermr.Shu <mr@shu.io>2014-02-21 08:11:52 +0100
commit70319f7b25e53d886cf15a33d2edb5220b1f736b (patch)
treefb1c802cf0dda90bf3895bf84ff14cf4af5da8d5
parentd70f909fa3bdc1c8231f127882cc30f274b263d1 (diff)
downloadrust-70319f7b25e53d886cf15a33d2edb5220b1f736b.tar.gz
rust-70319f7b25e53d886cf15a33d2edb5220b1f736b.zip
Changed NonCamelCaseTypes lint to warn by default
Added allow(non_camel_case_types) to librustc where necesary

Tried to fix problems with non_camel_case_types outside rustc

fixed failing tests

Docs updated

Moved #[allow(non_camel_case_types)] a level higher.

markdown.rs reverted

Fixed timer that was failing tests

Fixed another timer
-rw-r--r--src/doc/guide-macros.md68
-rw-r--r--src/doc/rust.md10
-rw-r--r--src/libnative/io/file.rs4
-rw-r--r--src/libnative/io/net.rs4
-rw-r--r--src/libnative/io/timer_helper.rs5
-rw-r--r--src/libnative/io/timer_other.rs2
-rw-r--r--src/libnative/io/timer_timerfd.rs4
-rw-r--r--src/librustc/back/target_strs.rs1
-rw-r--r--src/librustc/lib/llvm.rs1
-rw-r--r--src/librustc/metadata/common.rs4
-rw-r--r--src/librustc/metadata/creader.rs4
-rw-r--r--src/librustc/metadata/csearch.rs1
-rw-r--r--src/librustc/metadata/cstore.rs3
-rw-r--r--src/librustc/metadata/decoder.rs3
-rw-r--r--src/librustc/metadata/encoder.rs3
-rw-r--r--src/librustc/metadata/filesearch.rs4
-rw-r--r--src/librustc/metadata/tydecode.rs3
-rw-r--r--src/librustc/metadata/tyencode.rs3
-rw-r--r--src/librustc/middle/astencode.rs3
-rw-r--r--src/librustc/middle/borrowck/mod.rs3
-rw-r--r--src/librustc/middle/check_match.rs3
-rw-r--r--src/librustc/middle/const_eval.rs3
-rw-r--r--src/librustc/middle/freevars.rs3
-rw-r--r--src/librustc/middle/lint.rs4
-rw-r--r--src/librustc/middle/mem_categorization.rs3
-rw-r--r--src/librustc/middle/resolve.rs2
-rw-r--r--src/librustc/middle/trans/_match.rs1
-rw-r--r--src/librustc/middle/trans/base.rs3
-rw-r--r--src/librustc/middle/trans/common.rs4
-rw-r--r--src/librustc/middle/trans/expr.rs4
-rw-r--r--src/librustc/middle/trans/tvec.rs3
-rw-r--r--src/librustc/middle/trans/type_of.rs1
-rw-r--r--src/librustc/middle/ty.rs2
-rw-r--r--src/librustc/middle/typeck/check/_match.rs3
-rw-r--r--src/librustc/middle/typeck/infer/mod.rs3
-rw-r--r--src/librustc/middle/typeck/mod.rs3
-rw-r--r--src/librustc/util/common.rs1
-rw-r--r--src/librustdoc/html/markdown.rs2
-rw-r--r--src/librustdoc/plugins.rs6
-rw-r--r--src/test/compile-fail/lint-dead-code-1.rs1
-rw-r--r--src/test/compile-fail/lint-dead-code-3.rs1
-rw-r--r--src/test/compile-fail/lint-unused-import-tricky-names.rs1
42 files changed, 122 insertions, 68 deletions
diff --git a/src/doc/guide-macros.md b/src/doc/guide-macros.md
index b8ebca206d5..527777a0eba 100644
--- a/src/doc/guide-macros.md
+++ b/src/doc/guide-macros.md
@@ -11,17 +11,17 @@ which both pattern-match on their input and both return early in one case,
 doing nothing otherwise:
 
 ~~~~
-# enum t { special_a(uint), special_b(uint) };
+# enum T { SpecialA(uint), SpecialB(uint) };
 # fn f() -> uint {
-# let input_1 = special_a(0);
-# let input_2 = special_a(0);
+# let input_1 = SpecialA(0);
+# let input_2 = SpecialA(0);
 match input_1 {
-    special_a(x) => { return x; }
+    SpecialA(x) => { return x; }
     _ => {}
 }
 // ...
 match input_2 {
-    special_b(x) => { return x; }
+    SpecialB(x) => { return x; }
     _ => {}
 }
 # return 0u;
@@ -37,12 +37,12 @@ lightweight custom syntax extensions, themselves defined using the
 the pattern in the above code:
 
 ~~~~
-# enum t { special_a(uint), special_b(uint) };
+# enum T { SpecialA(uint), SpecialB(uint) };
 # fn f() -> uint {
-# let input_1 = special_a(0);
-# let input_2 = special_a(0);
+# let input_1 = SpecialA(0);
+# let input_2 = SpecialA(0);
 macro_rules! early_return(
-    ($inp:expr $sp:ident) => ( // invoke it like `(input_5 special_e)`
+    ($inp:expr $sp:ident) => ( // invoke it like `(input_5 SpecialE)`
         match $inp {
             $sp(x) => { return x; }
             _ => {}
@@ -50,9 +50,9 @@ macro_rules! early_return(
     );
 )
 // ...
-early_return!(input_1 special_a);
+early_return!(input_1 SpecialA);
 // ...
-early_return!(input_2 special_b);
+early_return!(input_2 SpecialB);
 # return 0;
 # }
 ~~~~
@@ -155,10 +155,10 @@ separator token (a comma-separated list could be written `$(...),*`), and `+`
 instead of `*` to mean "at least one".
 
 ~~~~
-# enum t { special_a(uint),special_b(uint),special_c(uint),special_d(uint)};
+# enum T { SpecialA(uint),SpecialB(uint),SpecialC(uint),SpecialD(uint)};
 # fn f() -> uint {
-# let input_1 = special_a(0);
-# let input_2 = special_a(0);
+# let input_1 = SpecialA(0);
+# let input_2 = SpecialA(0);
 macro_rules! early_return(
     ($inp:expr, [ $($sp:ident)|+ ]) => (
         match $inp {
@@ -170,9 +170,9 @@ macro_rules! early_return(
     );
 )
 // ...
-early_return!(input_1, [special_a|special_c|special_d]);
+early_return!(input_1, [SpecialA|SpecialC|SpecialD]);
 // ...
-early_return!(input_2, [special_b]);
+early_return!(input_2, [SpecialB]);
 # return 0;
 # }
 ~~~~
@@ -215,14 +215,14 @@ solves the problem.
 Now consider code like the following:
 
 ~~~~
-# enum t1 { good_1(t2, uint), bad_1 };
-# struct t2 { body: t3 }
-# enum t3 { good_2(uint), bad_2};
-# fn f(x: t1) -> uint {
+# enum T1 { Good1(T2, uint), Bad1};
+# struct T2 { body: T3 }
+# enum T3 { Good2(uint), Bad2};
+# fn f(x: T1) -> uint {
 match x {
-    good_1(g1, val) => {
+    Good1(g1, val) => {
         match g1.body {
-            good_2(result) => {
+            Good2(result) => {
                 // complicated stuff goes here
                 return result + val;
             },
@@ -261,13 +261,13 @@ macro_rules! biased_match (
     )
 )
 
-# enum t1 { good_1(t2, uint), bad_1 };
-# struct t2 { body: t3 }
-# enum t3 { good_2(uint), bad_2};
-# fn f(x: t1) -> uint {
-biased_match!((x)       ~ (good_1(g1, val)) else { return 0 };
+# enum T1 { Good1(T2, uint), Bad1};
+# struct T2 { body: T3 }
+# enum T3 { Good2(uint), Bad2};
+# fn f(x: T1) -> uint {
+biased_match!((x)       ~ (Good1(g1, val)) else { return 0 };
               binds g1, val )
-biased_match!((g1.body) ~ (good_2(result) )
+biased_match!((g1.body) ~ (Good2(result) )
                   else { fail!("Didn't get good_2") };
               binds result )
 // complicated stuff goes here
@@ -365,13 +365,13 @@ macro_rules! biased_match (
 )
 
 
-# enum t1 { good_1(t2, uint), bad_1 };
-# struct t2 { body: t3 }
-# enum t3 { good_2(uint), bad_2};
-# fn f(x: t1) -> uint {
+# enum T1 { Good1(T2, uint), Bad1};
+# struct T2 { body: T3 }
+# enum T3 { Good2(uint), Bad2};
+# fn f(x: T1) -> uint {
 biased_match!(
-    (x)       ~ (good_1(g1, val)) else { return 0 };
-    (g1.body) ~ (good_2(result) ) else { fail!("Didn't get good_2") };
+    (x)       ~ (Good1(g1, val)) else { return 0 };
+    (g1.body) ~ (Good2(result) ) else { fail!("Didn't get Good2") };
     binds val, result )
 // complicated stuff goes here
 return result + val;
diff --git a/src/doc/rust.md b/src/doc/rust.md
index c605ed06ffd..65a570f5f41 100644
--- a/src/doc/rust.md
+++ b/src/doc/rust.md
@@ -470,7 +470,7 @@ Two examples of paths with type arguments:
 # use std::hashmap::HashMap;
 # fn f() {
 # fn id<T>(t: T) -> T { t }
-type t = HashMap<int,~str>;  // Type arguments used in a type expression
+type T = HashMap<int,~str>;  // Type arguments used in a type expression
 let x = id::<int>(10);         // Type arguments used in a call expression
 # }
 ~~~~
@@ -701,7 +701,7 @@ An example of a module:
 
 ~~~~
 mod math {
-    type complex = (f64, f64);
+    type Complex = (f64, f64);
     fn sin(f: f64) -> f64 {
         ...
 # fail!();
@@ -2824,13 +2824,13 @@ provided by an implementation of `std::iter::Iterator`.
 An example of a for loop over the contents of a vector:
 
 ~~~~
-# type foo = int;
-# fn bar(f: foo) { }
+# type Foo = int;
+# fn bar(f: Foo) { }
 # let a = 0;
 # let b = 0;
 # let c = 0;
 
-let v: &[foo] = &[a, b, c];
+let v: &[Foo] = &[a, b, c];
 
 for e in v.iter() {
     bar(*e);
diff --git a/src/libnative/io/file.rs b/src/libnative/io/file.rs
index 6d3a156a2b0..d1d2dba383d 100644
--- a/src/libnative/io/file.rs
+++ b/src/libnative/io/file.rs
@@ -1,4 +1,4 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -10,6 +10,8 @@
 
 //! Blocking posix-based file I/O
 
+#[allow(non_camel_case_types)];
+
 use std::sync::arc::UnsafeArc;
 use std::c_str::CString;
 use std::io::IoError;
diff --git a/src/libnative/io/net.rs b/src/libnative/io/net.rs
index b33b54862dc..d58e4d54342 100644
--- a/src/libnative/io/net.rs
+++ b/src/libnative/io/net.rs
@@ -1,4 +1,4 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[allow(non_camel_case_types)];
+
 use std::cast;
 use std::io::net::ip;
 use std::io;
diff --git a/src/libnative/io/timer_helper.rs b/src/libnative/io/timer_helper.rs
index 004cd6f3114..0f3ed148229 100644
--- a/src/libnative/io/timer_helper.rs
+++ b/src/libnative/io/timer_helper.rs
@@ -1,4 +1,4 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -20,6 +20,8 @@
 //! can be created in the future and there must be no active timers at that
 //! time.
 
+#[allow(non_camel_case_types)];
+
 use std::cast;
 use std::rt;
 use std::unstable::mutex::{StaticNativeMutex, NATIVE_MUTEX_INIT};
@@ -98,6 +100,7 @@ mod imp {
 
     use io::file::FileDesc;
 
+    #[allow(non_camel_case_types)]
     pub type signal = libc::c_int;
 
     pub fn new() -> (signal, signal) {
diff --git a/src/libnative/io/timer_other.rs b/src/libnative/io/timer_other.rs
index e20c017c4b5..3a060194a69 100644
--- a/src/libnative/io/timer_other.rs
+++ b/src/libnative/io/timer_other.rs
@@ -46,6 +46,8 @@
 //!
 //! Note that all time units in this file are in *milliseconds*.
 
+#[allow(non_camel_case_types)];
+
 use std::comm::Data;
 use std::hashmap::HashMap;
 use std::libc;
diff --git a/src/libnative/io/timer_timerfd.rs b/src/libnative/io/timer_timerfd.rs
index 434794e32cb..b1ae5820888 100644
--- a/src/libnative/io/timer_timerfd.rs
+++ b/src/libnative/io/timer_timerfd.rs
@@ -1,4 +1,4 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -28,6 +28,8 @@
 //!
 //! As with timer_other, all units in this file are in units of millseconds.
 
+#[allow(non_camel_case_types)];
+
 use std::comm::Data;
 use std::libc;
 use std::ptr;
diff --git a/src/librustc/back/target_strs.rs b/src/librustc/back/target_strs.rs
index 87133237878..044b5c7017c 100644
--- a/src/librustc/back/target_strs.rs
+++ b/src/librustc/back/target_strs.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[allow(non_camel_case_types)];
 
 pub struct t {
     module_asm: ~str,
diff --git a/src/librustc/lib/llvm.rs b/src/librustc/lib/llvm.rs
index 0e5abd64b8a..d565e378af4 100644
--- a/src/librustc/lib/llvm.rs
+++ b/src/librustc/lib/llvm.rs
@@ -9,6 +9,7 @@
 // except according to those terms.
 
 #[allow(non_uppercase_pattern_statics)];
+#[allow(non_camel_case_types)];
 
 use std::c_str::ToCStr;
 use std::cell::RefCell;
diff --git a/src/librustc/metadata/common.rs b/src/librustc/metadata/common.rs
index 48ec199ed00..9cf4df287d2 100644
--- a/src/librustc/metadata/common.rs
+++ b/src/librustc/metadata/common.rs
@@ -1,4 +1,4 @@
-// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[allow(non_camel_case_types)];
+
 use std::cast;
 use syntax::crateid::CrateId;
 
diff --git a/src/librustc/metadata/creader.rs b/src/librustc/metadata/creader.rs
index df250937a57..d361ee56936 100644
--- a/src/librustc/metadata/creader.rs
+++ b/src/librustc/metadata/creader.rs
@@ -1,4 +1,4 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[allow(non_camel_case_types)];
+
 //! Validates all used crates and extern libraries and loads their metadata
 
 use driver::{driver, session};
diff --git a/src/librustc/metadata/csearch.rs b/src/librustc/metadata/csearch.rs
index 7b0c900fcea..f238bc880a3 100644
--- a/src/librustc/metadata/csearch.rs
+++ b/src/librustc/metadata/csearch.rs
@@ -10,6 +10,7 @@
 
 // Searching for information from the cstore
 
+#[allow(non_camel_case_types)];
 
 use metadata::common::*;
 use metadata::cstore;
diff --git a/src/librustc/metadata/cstore.rs b/src/librustc/metadata/cstore.rs
index 4febde6d443..8c2c05b96cd 100644
--- a/src/librustc/metadata/cstore.rs
+++ b/src/librustc/metadata/cstore.rs
@@ -1,4 +1,4 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[allow(non_camel_case_types)];
 
 // The crate store - a central repo for information collected about external
 // crates and libraries
diff --git a/src/librustc/metadata/decoder.rs b/src/librustc/metadata/decoder.rs
index 58917eabb64..47fcc453489 100644
--- a/src/librustc/metadata/decoder.rs
+++ b/src/librustc/metadata/decoder.rs
@@ -1,4 +1,4 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -10,6 +10,7 @@
 
 // Decoding metadata from a single crate's metadata
 
+#[allow(non_camel_case_types)];
 
 use metadata::cstore::crate_metadata;
 use metadata::common::*;
diff --git a/src/librustc/metadata/encoder.rs b/src/librustc/metadata/encoder.rs
index 5fb3f48bd6e..d2b843cdcf7 100644
--- a/src/librustc/metadata/encoder.rs
+++ b/src/librustc/metadata/encoder.rs
@@ -1,4 +1,4 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -11,6 +11,7 @@
 // Metadata encoding
 
 #[allow(unused_must_use)]; // everything is just a MemWriter, can't fail
+#[allow(non_camel_case_types)];
 
 use metadata::common::*;
 use metadata::cstore;
diff --git a/src/librustc/metadata/filesearch.rs b/src/librustc/metadata/filesearch.rs
index 7e04a36ee2e..42231ce1b47 100644
--- a/src/librustc/metadata/filesearch.rs
+++ b/src/librustc/metadata/filesearch.rs
@@ -1,4 +1,4 @@
-// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[allow(non_camel_case_types)];
+
 use std::cell::RefCell;
 use std::option;
 use std::os;
diff --git a/src/librustc/metadata/tydecode.rs b/src/librustc/metadata/tydecode.rs
index ca1aabb74f4..c78721cdf4c 100644
--- a/src/librustc/metadata/tydecode.rs
+++ b/src/librustc/metadata/tydecode.rs
@@ -1,4 +1,4 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -14,6 +14,7 @@
 // tjc note: Would be great to have a `match check` macro equivalent
 // for some of these
 
+#[allow(non_camel_case_types)];
 
 use middle::ty;
 
diff --git a/src/librustc/metadata/tyencode.rs b/src/librustc/metadata/tyencode.rs
index d6245f13245..545c6606391 100644
--- a/src/librustc/metadata/tyencode.rs
+++ b/src/librustc/metadata/tyencode.rs
@@ -1,4 +1,4 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -11,6 +11,7 @@
 // Type encoding
 
 #[allow(unused_must_use)]; // as with encoding, everything is a no-fail MemWriter
+#[allow(non_camel_case_types)];
 
 use std::cell::RefCell;
 use std::hashmap::HashMap;
diff --git a/src/librustc/middle/astencode.rs b/src/librustc/middle/astencode.rs
index 04009fba7f0..8cc52627fcc 100644
--- a/src/librustc/middle/astencode.rs
+++ b/src/librustc/middle/astencode.rs
@@ -1,4 +1,4 @@
-// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[allow(non_camel_case_types)];
 
 use c = metadata::common;
 use cstore = metadata::cstore;
diff --git a/src/librustc/middle/borrowck/mod.rs b/src/librustc/middle/borrowck/mod.rs
index 042201040d9..c7157ad1703 100644
--- a/src/librustc/middle/borrowck/mod.rs
+++ b/src/librustc/middle/borrowck/mod.rs
@@ -1,4 +1,4 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -10,6 +10,7 @@
 
 /*! See doc.rs for a thorough explanation of the borrow checker */
 
+#[allow(non_camel_case_types)];
 
 use mc = middle::mem_categorization;
 use middle::ty;
diff --git a/src/librustc/middle/check_match.rs b/src/librustc/middle/check_match.rs
index cc05516ebac..c0789e0aa85 100644
--- a/src/librustc/middle/check_match.rs
+++ b/src/librustc/middle/check_match.rs
@@ -1,4 +1,4 @@
-// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[allow(non_camel_case_types)];
 
 use middle::const_eval::{compare_const_vals, lookup_const_by_id};
 use middle::const_eval::{eval_const_expr, const_val, const_bool, const_float};
diff --git a/src/librustc/middle/const_eval.rs b/src/librustc/middle/const_eval.rs
index 71223416ae2..9cf055cad9d 100644
--- a/src/librustc/middle/const_eval.rs
+++ b/src/librustc/middle/const_eval.rs
@@ -1,4 +1,4 @@
-// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[allow(non_camel_case_types)];
 
 use metadata::csearch;
 use middle::astencode;
diff --git a/src/librustc/middle/freevars.rs b/src/librustc/middle/freevars.rs
index 4dea61ab5de..4c488067ad3 100644
--- a/src/librustc/middle/freevars.rs
+++ b/src/librustc/middle/freevars.rs
@@ -1,4 +1,4 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -11,6 +11,7 @@
 // A pass that annotates for each loops and functions with the free
 // variables that they contain.
 
+#[allow(non_camel_case_types)];
 
 use middle::resolve;
 use middle::ty;
diff --git a/src/librustc/middle/lint.rs b/src/librustc/middle/lint.rs
index 37784116289..28436093a35 100644
--- a/src/librustc/middle/lint.rs
+++ b/src/librustc/middle/lint.rs
@@ -33,6 +33,8 @@
 //! modify the Context visitor appropriately. If you're adding lints from the
 //! Context itself, span_lint should be used instead of add_lint.
 
+#[allow(non_camel_case_types)];
+
 use driver::session;
 use metadata::csearch;
 use middle::dead::DEAD_CODE_LINT_STR;
@@ -189,7 +191,7 @@ static lint_table: &'static [(&'static str, LintSpec)] = &[
      LintSpec {
         lint: NonCamelCaseTypes,
         desc: "types, variants and traits should have camel case names",
-        default: allow
+        default: warn
      }),
 
     ("non_uppercase_statics",
diff --git a/src/librustc/middle/mem_categorization.rs b/src/librustc/middle/mem_categorization.rs
index f423c37b9c7..dddd7505440 100644
--- a/src/librustc/middle/mem_categorization.rs
+++ b/src/librustc/middle/mem_categorization.rs
@@ -1,4 +1,4 @@
-// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -60,6 +60,7 @@
  * tied to `x`. The type of `x'` will be a borrowed pointer.
  */
 
+#[allow(non_camel_case_types)];
 
 use middle::ty;
 use util::ppaux::{ty_to_str, region_ptr_to_str, Repr};
diff --git a/src/librustc/middle/resolve.rs b/src/librustc/middle/resolve.rs
index 327001fcd27..066e4d2b313 100644
--- a/src/librustc/middle/resolve.rs
+++ b/src/librustc/middle/resolve.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[allow(non_camel_case_types)];
+
 use driver::session::Session;
 use metadata::csearch;
 use metadata::decoder::{DefLike, DlDef, DlField, DlImpl};
diff --git a/src/librustc/middle/trans/_match.rs b/src/librustc/middle/trans/_match.rs
index 8828fd5e019..0aa8393e79d 100644
--- a/src/librustc/middle/trans/_match.rs
+++ b/src/librustc/middle/trans/_match.rs
@@ -192,6 +192,7 @@
  *
  */
 
+#[allow(non_camel_case_types)];
 
 use back::abi;
 use lib::llvm::{llvm, ValueRef, BasicBlockRef};
diff --git a/src/librustc/middle/trans/base.rs b/src/librustc/middle/trans/base.rs
index e76b2a81490..c14d98a487d 100644
--- a/src/librustc/middle/trans/base.rs
+++ b/src/librustc/middle/trans/base.rs
@@ -1,4 +1,4 @@
-// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -23,6 +23,7 @@
 //     but one TypeRef corresponds to many `ty::t`s; for instance, tup(int, int,
 //     int) and rec(x=int, y=int, z=int) will have the same TypeRef.
 
+#[allow(non_camel_case_types)];
 
 use back::link::{mangle_exported_name};
 use back::{link, abi};
diff --git a/src/librustc/middle/trans/common.rs b/src/librustc/middle/trans/common.rs
index 27ad5998d8c..d9e929c2501 100644
--- a/src/librustc/middle/trans/common.rs
+++ b/src/librustc/middle/trans/common.rs
@@ -1,4 +1,4 @@
-// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[allow(non_camel_case_types)];
+
 //! Code that is useful in various trans modules.
 
 use driver::session::Session;
diff --git a/src/librustc/middle/trans/expr.rs b/src/librustc/middle/trans/expr.rs
index 794964e1054..99852e446cc 100644
--- a/src/librustc/middle/trans/expr.rs
+++ b/src/librustc/middle/trans/expr.rs
@@ -1,4 +1,4 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -31,6 +31,8 @@
  * See doc.rs for more comments.
  */
 
+#[allow(non_camel_case_types)];
+
 use back::abi;
 use back::link;
 use lib::llvm::{ValueRef, llvm, SetLinkage, False};
diff --git a/src/librustc/middle/trans/tvec.rs b/src/librustc/middle/trans/tvec.rs
index c8180362bc5..43498727566 100644
--- a/src/librustc/middle/trans/tvec.rs
+++ b/src/librustc/middle/trans/tvec.rs
@@ -1,4 +1,4 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[allow(non_camel_case_types)];
 
 use back::abi;
 use lib;
diff --git a/src/librustc/middle/trans/type_of.rs b/src/librustc/middle/trans/type_of.rs
index f379b6227d9..55e237fda5d 100644
--- a/src/librustc/middle/trans/type_of.rs
+++ b/src/librustc/middle/trans/type_of.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[allow(non_camel_case_types)];
 
 use middle::trans::adt;
 use middle::trans::common::*;
diff --git a/src/librustc/middle/ty.rs b/src/librustc/middle/ty.rs
index e19b6eb1634..c19fe3445d9 100644
--- a/src/librustc/middle/ty.rs
+++ b/src/librustc/middle/ty.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[allow(non_camel_case_types)];
+
 use driver::session;
 use metadata::csearch;
 use metadata;
diff --git a/src/librustc/middle/typeck/check/_match.rs b/src/librustc/middle/typeck/check/_match.rs
index 4d783be689d..160b6f5ec4e 100644
--- a/src/librustc/middle/typeck/check/_match.rs
+++ b/src/librustc/middle/typeck/check/_match.rs
@@ -1,4 +1,4 @@
-// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[allow(non_camel_case_types)];
 
 use middle::pat_util::{PatIdMap, pat_id_map, pat_is_binding, pat_is_const};
 use middle::ty;
diff --git a/src/librustc/middle/typeck/infer/mod.rs b/src/librustc/middle/typeck/infer/mod.rs
index deec4100617..abff3b68395 100644
--- a/src/librustc/middle/typeck/infer/mod.rs
+++ b/src/librustc/middle/typeck/infer/mod.rs
@@ -1,4 +1,4 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -10,6 +10,7 @@
 
 /*! See doc.rs for documentation */
 
+#[allow(non_camel_case_types)];
 
 pub use middle::ty::IntVarValue;
 pub use middle::typeck::infer::resolve::resolve_and_force_all_but_regions;
diff --git a/src/librustc/middle/typeck/mod.rs b/src/librustc/middle/typeck/mod.rs
index 3741fd1c173..4f2c8966c50 100644
--- a/src/librustc/middle/typeck/mod.rs
+++ b/src/librustc/middle/typeck/mod.rs
@@ -1,4 +1,4 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -59,6 +59,7 @@ independently:
 
 */
 
+#[allow(non_camel_case_types)];
 
 use driver::session;
 
diff --git a/src/librustc/util/common.rs b/src/librustc/util/common.rs
index 0c3bf2e0135..586ed080835 100644
--- a/src/librustc/util/common.rs
+++ b/src/librustc/util/common.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[allow(non_camel_case_types)];
 
 use syntax::ast;
 use syntax::codemap::{Span};
diff --git a/src/librustdoc/html/markdown.rs b/src/librustdoc/html/markdown.rs
index 3668d4d3a2c..af0a43efa14 100644
--- a/src/librustdoc/html/markdown.rs
+++ b/src/librustdoc/html/markdown.rs
@@ -24,6 +24,8 @@
 //! // ... something using html
 //! ```
 
+#[allow(non_camel_case_types)];
+
 use std::cast;
 use std::fmt;
 use std::io;
diff --git a/src/librustdoc/plugins.rs b/src/librustdoc/plugins.rs
index 104cec9c814..3a6ea672507 100644
--- a/src/librustdoc/plugins.rs
+++ b/src/librustdoc/plugins.rs
@@ -15,12 +15,12 @@ use dl = std::unstable::dynamic_lib;
 
 pub type PluginJson = Option<(~str, json::Json)>;
 pub type PluginResult = (clean::Crate, PluginJson);
-pub type plugin_callback = extern fn (clean::Crate) -> PluginResult;
+pub type PluginCallback = extern fn (clean::Crate) -> PluginResult;
 
 /// Manages loading and running of plugins
 pub struct PluginManager {
     priv dylibs: ~[dl::DynamicLibrary],
-    priv callbacks: ~[plugin_callback],
+    priv callbacks: ~[PluginCallback],
     /// The directory plugins will be loaded from
     prefix: Path,
 }
@@ -53,7 +53,7 @@ impl PluginManager {
     ///
     /// This is to run passes over the cleaned crate. Plugins run this way
     /// correspond to the A-aux tag on Github.
-    pub fn add_plugin(&mut self, plugin: plugin_callback) {
+    pub fn add_plugin(&mut self, plugin: PluginCallback) {
         self.callbacks.push(plugin);
     }
     /// Run all the loaded plugins over the crate, returning their results
diff --git a/src/test/compile-fail/lint-dead-code-1.rs b/src/test/compile-fail/lint-dead-code-1.rs
index 8a9397b0227..b6965a003e0 100644
--- a/src/test/compile-fail/lint-dead-code-1.rs
+++ b/src/test/compile-fail/lint-dead-code-1.rs
@@ -10,6 +10,7 @@
 
 #[no_std];
 #[allow(unused_variable)];
+#[allow(non_camel_case_types)];
 #[deny(dead_code)];
 
 #[crate_type="lib"];
diff --git a/src/test/compile-fail/lint-dead-code-3.rs b/src/test/compile-fail/lint-dead-code-3.rs
index 26e4093caab..e07fc96a1f3 100644
--- a/src/test/compile-fail/lint-dead-code-3.rs
+++ b/src/test/compile-fail/lint-dead-code-3.rs
@@ -9,6 +9,7 @@
 // except according to those terms.
 
 #[allow(unused_variable)];
+#[allow(non_camel_case_types)];
 #[deny(dead_code)];
 
 #[crate_type="lib"];
diff --git a/src/test/compile-fail/lint-unused-import-tricky-names.rs b/src/test/compile-fail/lint-unused-import-tricky-names.rs
index 24511296a0b..0dc1091dabd 100644
--- a/src/test/compile-fail/lint-unused-import-tricky-names.rs
+++ b/src/test/compile-fail/lint-unused-import-tricky-names.rs
@@ -9,6 +9,7 @@
 // except according to those terms.
 
 #[deny(unused_imports)];
+#[allow(non_camel_case_types)];
 #[allow(dead_code)];
 
 // Regression test for issue #6633