1
Fork 0

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
This commit is contained in:
mr.Shu 2014-02-10 15:36:31 +01:00
parent d70f909fa3
commit 70319f7b25
42 changed files with 122 additions and 68 deletions

View file

@ -11,17 +11,17 @@ which both pattern-match on their input and both return early in one case,
doing nothing otherwise: doing nothing otherwise:
~~~~ ~~~~
# enum t { special_a(uint), special_b(uint) }; # enum T { SpecialA(uint), SpecialB(uint) };
# fn f() -> uint { # fn f() -> uint {
# let input_1 = special_a(0); # let input_1 = SpecialA(0);
# let input_2 = special_a(0); # let input_2 = SpecialA(0);
match input_1 { match input_1 {
special_a(x) => { return x; } SpecialA(x) => { return x; }
_ => {} _ => {}
} }
// ... // ...
match input_2 { match input_2 {
special_b(x) => { return x; } SpecialB(x) => { return x; }
_ => {} _ => {}
} }
# return 0u; # return 0u;
@ -37,12 +37,12 @@ lightweight custom syntax extensions, themselves defined using the
the pattern in the above code: the pattern in the above code:
~~~~ ~~~~
# enum t { special_a(uint), special_b(uint) }; # enum T { SpecialA(uint), SpecialB(uint) };
# fn f() -> uint { # fn f() -> uint {
# let input_1 = special_a(0); # let input_1 = SpecialA(0);
# let input_2 = special_a(0); # let input_2 = SpecialA(0);
macro_rules! early_return( 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 { match $inp {
$sp(x) => { return x; } $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; # return 0;
# } # }
~~~~ ~~~~
@ -155,10 +155,10 @@ separator token (a comma-separated list could be written `$(...),*`), and `+`
instead of `*` to mean "at least one". 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 { # fn f() -> uint {
# let input_1 = special_a(0); # let input_1 = SpecialA(0);
# let input_2 = special_a(0); # let input_2 = SpecialA(0);
macro_rules! early_return( macro_rules! early_return(
($inp:expr, [ $($sp:ident)|+ ]) => ( ($inp:expr, [ $($sp:ident)|+ ]) => (
match $inp { 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; # return 0;
# } # }
~~~~ ~~~~
@ -215,14 +215,14 @@ solves the problem.
Now consider code like the following: Now consider code like the following:
~~~~ ~~~~
# enum t1 { good_1(t2, uint), bad_1 }; # enum T1 { Good1(T2, uint), Bad1};
# struct t2 { body: t3 } # struct T2 { body: T3 }
# enum t3 { good_2(uint), bad_2}; # enum T3 { Good2(uint), Bad2};
# fn f(x: t1) -> uint { # fn f(x: T1) -> uint {
match x { match x {
good_1(g1, val) => { Good1(g1, val) => {
match g1.body { match g1.body {
good_2(result) => { Good2(result) => {
// complicated stuff goes here // complicated stuff goes here
return result + val; return result + val;
}, },
@ -261,13 +261,13 @@ macro_rules! biased_match (
) )
) )
# enum t1 { good_1(t2, uint), bad_1 }; # enum T1 { Good1(T2, uint), Bad1};
# struct t2 { body: t3 } # struct T2 { body: T3 }
# enum t3 { good_2(uint), bad_2}; # enum T3 { Good2(uint), Bad2};
# fn f(x: t1) -> uint { # fn f(x: T1) -> uint {
biased_match!((x) ~ (good_1(g1, val)) else { return 0 }; biased_match!((x) ~ (Good1(g1, val)) else { return 0 };
binds g1, val ) binds g1, val )
biased_match!((g1.body) ~ (good_2(result) ) biased_match!((g1.body) ~ (Good2(result) )
else { fail!("Didn't get good_2") }; else { fail!("Didn't get good_2") };
binds result ) binds result )
// complicated stuff goes here // complicated stuff goes here
@ -365,13 +365,13 @@ macro_rules! biased_match (
) )
# enum t1 { good_1(t2, uint), bad_1 }; # enum T1 { Good1(T2, uint), Bad1};
# struct t2 { body: t3 } # struct T2 { body: T3 }
# enum t3 { good_2(uint), bad_2}; # enum T3 { Good2(uint), Bad2};
# fn f(x: t1) -> uint { # fn f(x: T1) -> uint {
biased_match!( biased_match!(
(x) ~ (good_1(g1, val)) else { return 0 }; (x) ~ (Good1(g1, val)) else { return 0 };
(g1.body) ~ (good_2(result) ) else { fail!("Didn't get good_2") }; (g1.body) ~ (Good2(result) ) else { fail!("Didn't get Good2") };
binds val, result ) binds val, result )
// complicated stuff goes here // complicated stuff goes here
return result + val; return result + val;

View file

@ -470,7 +470,7 @@ Two examples of paths with type arguments:
# use std::hashmap::HashMap; # use std::hashmap::HashMap;
# fn f() { # fn f() {
# fn id<T>(t: T) -> T { t } # 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 let x = id::<int>(10); // Type arguments used in a call expression
# } # }
~~~~ ~~~~
@ -701,7 +701,7 @@ An example of a module:
~~~~ ~~~~
mod math { mod math {
type complex = (f64, f64); type Complex = (f64, f64);
fn sin(f: f64) -> f64 { fn sin(f: f64) -> f64 {
... ...
# fail!(); # 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: An example of a for loop over the contents of a vector:
~~~~ ~~~~
# type foo = int; # type Foo = int;
# fn bar(f: foo) { } # fn bar(f: Foo) { }
# let a = 0; # let a = 0;
# let b = 0; # let b = 0;
# let c = 0; # let c = 0;
let v: &[foo] = &[a, b, c]; let v: &[Foo] = &[a, b, c];
for e in v.iter() { for e in v.iter() {
bar(*e); bar(*e);

View file

@ -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 // file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT. // http://rust-lang.org/COPYRIGHT.
// //
@ -10,6 +10,8 @@
//! Blocking posix-based file I/O //! Blocking posix-based file I/O
#[allow(non_camel_case_types)];
use std::sync::arc::UnsafeArc; use std::sync::arc::UnsafeArc;
use std::c_str::CString; use std::c_str::CString;
use std::io::IoError; use std::io::IoError;

View file

@ -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 // file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT. // http://rust-lang.org/COPYRIGHT.
// //
@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#[allow(non_camel_case_types)];
use std::cast; use std::cast;
use std::io::net::ip; use std::io::net::ip;
use std::io; use std::io;

View file

@ -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 // file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT. // http://rust-lang.org/COPYRIGHT.
// //
@ -20,6 +20,8 @@
//! can be created in the future and there must be no active timers at that //! can be created in the future and there must be no active timers at that
//! time. //! time.
#[allow(non_camel_case_types)];
use std::cast; use std::cast;
use std::rt; use std::rt;
use std::unstable::mutex::{StaticNativeMutex, NATIVE_MUTEX_INIT}; use std::unstable::mutex::{StaticNativeMutex, NATIVE_MUTEX_INIT};
@ -98,6 +100,7 @@ mod imp {
use io::file::FileDesc; use io::file::FileDesc;
#[allow(non_camel_case_types)]
pub type signal = libc::c_int; pub type signal = libc::c_int;
pub fn new() -> (signal, signal) { pub fn new() -> (signal, signal) {

View file

@ -46,6 +46,8 @@
//! //!
//! Note that all time units in this file are in *milliseconds*. //! Note that all time units in this file are in *milliseconds*.
#[allow(non_camel_case_types)];
use std::comm::Data; use std::comm::Data;
use std::hashmap::HashMap; use std::hashmap::HashMap;
use std::libc; use std::libc;

View file

@ -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 // file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT. // http://rust-lang.org/COPYRIGHT.
// //
@ -28,6 +28,8 @@
//! //!
//! As with timer_other, all units in this file are in units of millseconds. //! 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::comm::Data;
use std::libc; use std::libc;
use std::ptr; use std::ptr;

View file

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#[allow(non_camel_case_types)];
pub struct t { pub struct t {
module_asm: ~str, module_asm: ~str,

View file

@ -9,6 +9,7 @@
// except according to those terms. // except according to those terms.
#[allow(non_uppercase_pattern_statics)]; #[allow(non_uppercase_pattern_statics)];
#[allow(non_camel_case_types)];
use std::c_str::ToCStr; use std::c_str::ToCStr;
use std::cell::RefCell; use std::cell::RefCell;

View file

@ -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 // file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT. // http://rust-lang.org/COPYRIGHT.
// //
@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#[allow(non_camel_case_types)];
use std::cast; use std::cast;
use syntax::crateid::CrateId; use syntax::crateid::CrateId;

View file

@ -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 // file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT. // http://rust-lang.org/COPYRIGHT.
// //
@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#[allow(non_camel_case_types)];
//! Validates all used crates and extern libraries and loads their metadata //! Validates all used crates and extern libraries and loads their metadata
use driver::{driver, session}; use driver::{driver, session};

View file

@ -10,6 +10,7 @@
// Searching for information from the cstore // Searching for information from the cstore
#[allow(non_camel_case_types)];
use metadata::common::*; use metadata::common::*;
use metadata::cstore; use metadata::cstore;

View file

@ -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 // file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT. // http://rust-lang.org/COPYRIGHT.
// //
@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#[allow(non_camel_case_types)];
// The crate store - a central repo for information collected about external // The crate store - a central repo for information collected about external
// crates and libraries // crates and libraries

View file

@ -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 // file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT. // http://rust-lang.org/COPYRIGHT.
// //
@ -10,6 +10,7 @@
// Decoding metadata from a single crate's metadata // Decoding metadata from a single crate's metadata
#[allow(non_camel_case_types)];
use metadata::cstore::crate_metadata; use metadata::cstore::crate_metadata;
use metadata::common::*; use metadata::common::*;

View file

@ -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 // file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT. // http://rust-lang.org/COPYRIGHT.
// //
@ -11,6 +11,7 @@
// Metadata encoding // Metadata encoding
#[allow(unused_must_use)]; // everything is just a MemWriter, can't fail #[allow(unused_must_use)]; // everything is just a MemWriter, can't fail
#[allow(non_camel_case_types)];
use metadata::common::*; use metadata::common::*;
use metadata::cstore; use metadata::cstore;

View file

@ -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 // file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT. // http://rust-lang.org/COPYRIGHT.
// //
@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#[allow(non_camel_case_types)];
use std::cell::RefCell; use std::cell::RefCell;
use std::option; use std::option;
use std::os; use std::os;

View file

@ -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 // file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT. // http://rust-lang.org/COPYRIGHT.
// //
@ -14,6 +14,7 @@
// tjc note: Would be great to have a `match check` macro equivalent // tjc note: Would be great to have a `match check` macro equivalent
// for some of these // for some of these
#[allow(non_camel_case_types)];
use middle::ty; use middle::ty;

View file

@ -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 // file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT. // http://rust-lang.org/COPYRIGHT.
// //
@ -11,6 +11,7 @@
// Type encoding // Type encoding
#[allow(unused_must_use)]; // as with encoding, everything is a no-fail MemWriter #[allow(unused_must_use)]; // as with encoding, everything is a no-fail MemWriter
#[allow(non_camel_case_types)];
use std::cell::RefCell; use std::cell::RefCell;
use std::hashmap::HashMap; use std::hashmap::HashMap;

View file

@ -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 // file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT. // http://rust-lang.org/COPYRIGHT.
// //
@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#[allow(non_camel_case_types)];
use c = metadata::common; use c = metadata::common;
use cstore = metadata::cstore; use cstore = metadata::cstore;

View file

@ -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 // file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT. // http://rust-lang.org/COPYRIGHT.
// //
@ -10,6 +10,7 @@
/*! See doc.rs for a thorough explanation of the borrow checker */ /*! See doc.rs for a thorough explanation of the borrow checker */
#[allow(non_camel_case_types)];
use mc = middle::mem_categorization; use mc = middle::mem_categorization;
use middle::ty; use middle::ty;

View file

@ -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 // file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT. // http://rust-lang.org/COPYRIGHT.
// //
@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // 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::{compare_const_vals, lookup_const_by_id};
use middle::const_eval::{eval_const_expr, const_val, const_bool, const_float}; use middle::const_eval::{eval_const_expr, const_val, const_bool, const_float};

View file

@ -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 // file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT. // http://rust-lang.org/COPYRIGHT.
// //
@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#[allow(non_camel_case_types)];
use metadata::csearch; use metadata::csearch;
use middle::astencode; use middle::astencode;

View file

@ -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 // file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT. // http://rust-lang.org/COPYRIGHT.
// //
@ -11,6 +11,7 @@
// A pass that annotates for each loops and functions with the free // A pass that annotates for each loops and functions with the free
// variables that they contain. // variables that they contain.
#[allow(non_camel_case_types)];
use middle::resolve; use middle::resolve;
use middle::ty; use middle::ty;

View file

@ -33,6 +33,8 @@
//! modify the Context visitor appropriately. If you're adding lints from the //! modify the Context visitor appropriately. If you're adding lints from the
//! Context itself, span_lint should be used instead of add_lint. //! Context itself, span_lint should be used instead of add_lint.
#[allow(non_camel_case_types)];
use driver::session; use driver::session;
use metadata::csearch; use metadata::csearch;
use middle::dead::DEAD_CODE_LINT_STR; use middle::dead::DEAD_CODE_LINT_STR;
@ -189,7 +191,7 @@ static lint_table: &'static [(&'static str, LintSpec)] = &[
LintSpec { LintSpec {
lint: NonCamelCaseTypes, lint: NonCamelCaseTypes,
desc: "types, variants and traits should have camel case names", desc: "types, variants and traits should have camel case names",
default: allow default: warn
}), }),
("non_uppercase_statics", ("non_uppercase_statics",

View file

@ -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 // file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT. // http://rust-lang.org/COPYRIGHT.
// //
@ -60,6 +60,7 @@
* tied to `x`. The type of `x'` will be a borrowed pointer. * tied to `x`. The type of `x'` will be a borrowed pointer.
*/ */
#[allow(non_camel_case_types)];
use middle::ty; use middle::ty;
use util::ppaux::{ty_to_str, region_ptr_to_str, Repr}; use util::ppaux::{ty_to_str, region_ptr_to_str, Repr};

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#[allow(non_camel_case_types)];
use driver::session::Session; use driver::session::Session;
use metadata::csearch; use metadata::csearch;
use metadata::decoder::{DefLike, DlDef, DlField, DlImpl}; use metadata::decoder::{DefLike, DlDef, DlField, DlImpl};

View file

@ -192,6 +192,7 @@
* *
*/ */
#[allow(non_camel_case_types)];
use back::abi; use back::abi;
use lib::llvm::{llvm, ValueRef, BasicBlockRef}; use lib::llvm::{llvm, ValueRef, BasicBlockRef};

View file

@ -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 // file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT. // http://rust-lang.org/COPYRIGHT.
// //
@ -23,6 +23,7 @@
// but one TypeRef corresponds to many `ty::t`s; for instance, tup(int, int, // 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. // 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::{mangle_exported_name};
use back::{link, abi}; use back::{link, abi};

View file

@ -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 // file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT. // http://rust-lang.org/COPYRIGHT.
// //
@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#[allow(non_camel_case_types)];
//! Code that is useful in various trans modules. //! Code that is useful in various trans modules.
use driver::session::Session; use driver::session::Session;

View file

@ -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 // file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT. // http://rust-lang.org/COPYRIGHT.
// //
@ -31,6 +31,8 @@
* See doc.rs for more comments. * See doc.rs for more comments.
*/ */
#[allow(non_camel_case_types)];
use back::abi; use back::abi;
use back::link; use back::link;
use lib::llvm::{ValueRef, llvm, SetLinkage, False}; use lib::llvm::{ValueRef, llvm, SetLinkage, False};

View file

@ -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 // file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT. // http://rust-lang.org/COPYRIGHT.
// //
@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#[allow(non_camel_case_types)];
use back::abi; use back::abi;
use lib; use lib;

View file

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#[allow(non_camel_case_types)];
use middle::trans::adt; use middle::trans::adt;
use middle::trans::common::*; use middle::trans::common::*;

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#[allow(non_camel_case_types)];
use driver::session; use driver::session;
use metadata::csearch; use metadata::csearch;
use metadata; use metadata;

View file

@ -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 // file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT. // http://rust-lang.org/COPYRIGHT.
// //
@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // 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::pat_util::{PatIdMap, pat_id_map, pat_is_binding, pat_is_const};
use middle::ty; use middle::ty;

View file

@ -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 // file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT. // http://rust-lang.org/COPYRIGHT.
// //
@ -10,6 +10,7 @@
/*! See doc.rs for documentation */ /*! See doc.rs for documentation */
#[allow(non_camel_case_types)];
pub use middle::ty::IntVarValue; pub use middle::ty::IntVarValue;
pub use middle::typeck::infer::resolve::resolve_and_force_all_but_regions; pub use middle::typeck::infer::resolve::resolve_and_force_all_but_regions;

View file

@ -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 // file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT. // http://rust-lang.org/COPYRIGHT.
// //
@ -59,6 +59,7 @@ independently:
*/ */
#[allow(non_camel_case_types)];
use driver::session; use driver::session;

View file

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#[allow(non_camel_case_types)];
use syntax::ast; use syntax::ast;
use syntax::codemap::{Span}; use syntax::codemap::{Span};

View file

@ -24,6 +24,8 @@
//! // ... something using html //! // ... something using html
//! ``` //! ```
#[allow(non_camel_case_types)];
use std::cast; use std::cast;
use std::fmt; use std::fmt;
use std::io; use std::io;

View file

@ -15,12 +15,12 @@ use dl = std::unstable::dynamic_lib;
pub type PluginJson = Option<(~str, json::Json)>; pub type PluginJson = Option<(~str, json::Json)>;
pub type PluginResult = (clean::Crate, PluginJson); 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 /// Manages loading and running of plugins
pub struct PluginManager { pub struct PluginManager {
priv dylibs: ~[dl::DynamicLibrary], priv dylibs: ~[dl::DynamicLibrary],
priv callbacks: ~[plugin_callback], priv callbacks: ~[PluginCallback],
/// The directory plugins will be loaded from /// The directory plugins will be loaded from
prefix: Path, prefix: Path,
} }
@ -53,7 +53,7 @@ impl PluginManager {
/// ///
/// This is to run passes over the cleaned crate. Plugins run this way /// This is to run passes over the cleaned crate. Plugins run this way
/// correspond to the A-aux tag on Github. /// 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); self.callbacks.push(plugin);
} }
/// Run all the loaded plugins over the crate, returning their results /// Run all the loaded plugins over the crate, returning their results

View file

@ -10,6 +10,7 @@
#[no_std]; #[no_std];
#[allow(unused_variable)]; #[allow(unused_variable)];
#[allow(non_camel_case_types)];
#[deny(dead_code)]; #[deny(dead_code)];
#[crate_type="lib"]; #[crate_type="lib"];

View file

@ -9,6 +9,7 @@
// except according to those terms. // except according to those terms.
#[allow(unused_variable)]; #[allow(unused_variable)];
#[allow(non_camel_case_types)];
#[deny(dead_code)]; #[deny(dead_code)];
#[crate_type="lib"]; #[crate_type="lib"];

View file

@ -9,6 +9,7 @@
// except according to those terms. // except according to those terms.
#[deny(unused_imports)]; #[deny(unused_imports)];
#[allow(non_camel_case_types)];
#[allow(dead_code)]; #[allow(dead_code)];
// Regression test for issue #6633 // Regression test for issue #6633