diff options
| author | P1start <rewi-github@whanau.org> | 2014-09-13 13:55:37 +1200 |
|---|---|---|
| committer | P1start <rewi-github@whanau.org> | 2014-10-03 20:39:56 +1300 |
| commit | 94bcd3539c761b4ecf423800bce21057c4e961fa (patch) | |
| tree | 51c0030bfc0a527ce57da49f0987f726ea0ed912 /src/libsyntax | |
| parent | aa034cd3bac3155e0f6c74c399314b5ee32f88fc (diff) | |
| download | rust-94bcd3539c761b4ecf423800bce21057c4e961fa.tar.gz rust-94bcd3539c761b4ecf423800bce21057c4e961fa.zip | |
Set the `non_uppercase_statics` lint to warn by default
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/abi.rs | 3 | ||||
| -rw-r--r-- | src/libsyntax/ast_util.rs | 1 | ||||
| -rw-r--r-- | src/libsyntax/parse/token.rs | 7 | ||||
| -rw-r--r-- | src/libsyntax/print/pprust.rs | 2 |
4 files changed, 11 insertions, 2 deletions
diff --git a/src/libsyntax/abi.rs b/src/libsyntax/abi.rs index 6d9b8821bd8..3a02d74edff 100644 --- a/src/libsyntax/abi.rs +++ b/src/libsyntax/abi.rs @@ -47,7 +47,9 @@ pub enum Architecture { Mipsel } +#[allow(non_uppercase_statics)] static IntelBits: u32 = (1 << (X86 as uint)) | (1 << (X86_64 as uint)); +#[allow(non_uppercase_statics)] static ArmBits: u32 = (1 << (Arm as uint)); pub struct AbiData { @@ -70,6 +72,7 @@ pub enum AbiArchitecture { Archs(u32) } +#[allow(non_uppercase_statics)] static AbiDatas: &'static [AbiData] = &[ // Platform-specific ABIs AbiData {abi: Cdecl, name: "cdecl", abi_arch: Archs(IntelBits)}, diff --git a/src/libsyntax/ast_util.rs b/src/libsyntax/ast_util.rs index 31860062580..f746e1f1482 100644 --- a/src/libsyntax/ast_util.rs +++ b/src/libsyntax/ast_util.rs @@ -293,6 +293,7 @@ pub fn operator_prec(op: ast::BinOp) -> uint { /// Precedence of the `as` operator, which is a binary operator /// not appearing in the prior table. +#[allow(non_uppercase_statics)] pub static as_prec: uint = 12u; pub fn empty_generics() -> Generics { diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs index a486ac40a97..a8c827439cc 100644 --- a/src/libsyntax/parse/token.rs +++ b/src/libsyntax/parse/token.rs @@ -383,12 +383,15 @@ macro_rules! declare_special_idents_and_keywords {( pub mod special_idents { use ast::{Ident, Name}; - $( pub static $si_static: Ident = Ident { name: Name($si_name), ctxt: 0 }; )* + $( + #[allow(non_uppercase_statics)] + pub static $si_static: Ident = Ident { name: Name($si_name), ctxt: 0 }; + )* } pub mod special_names { use ast::Name; - $( pub static $si_static: Name = Name($si_name); )* + $( #[allow(non_uppercase_statics)] pub static $si_static: Name = Name($si_name); )* } /** diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index 8400d9aea3b..c3a3848019a 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -89,8 +89,10 @@ pub fn rust_printer_annotated<'a>(writer: Box<io::Writer+'static>, } } +#[allow(non_uppercase_statics)] pub static indent_unit: uint = 4u; +#[allow(non_uppercase_statics)] pub static default_columns: uint = 78u; /// Requires you to pass an input filename and reader so that |
