diff --git a/src/bootstrap/job.rs b/src/bootstrap/job.rs index 6445ce8da332e..e6ee525ca2e03 100644 --- a/src/bootstrap/job.rs +++ b/src/bootstrap/job.rs @@ -37,7 +37,7 @@ //! Note that this module has a #[cfg(windows)] above it as none of this logic //! is required on Unix. -#![allow(bad_style, dead_code)] +#![allow(nonstandard_style, dead_code)] use std::env; use std::io; diff --git a/src/bootstrap/util.rs b/src/bootstrap/util.rs index be03796921af8..8ce8f20add3ad 100644 --- a/src/bootstrap/util.rs +++ b/src/bootstrap/util.rs @@ -137,7 +137,7 @@ pub fn symlink_dir(config: &Config, src: &Path, dest: &Path) -> io::Result<()> { // // Copied from std #[cfg(windows)] - #[allow(bad_style)] + #[allow(nonstandard_style)] fn symlink_dir_inner(target: &Path, junction: &Path) -> io::Result<()> { use std::ptr; use std::ffi::OsStr; diff --git a/src/liballoc_system/lib.rs b/src/liballoc_system/lib.rs index ffab9e8e4af3c..8848be5903810 100644 --- a/src/liballoc_system/lib.rs +++ b/src/liballoc_system/lib.rs @@ -220,7 +220,7 @@ mod platform { } #[cfg(windows)] -#[allow(bad_style)] +#[allow(nonstandard_style)] mod platform { use MIN_ALIGN; use System; diff --git a/src/libpanic_unwind/seh.rs b/src/libpanic_unwind/seh.rs index 015be2dea2157..d6298a38a2601 100644 --- a/src/libpanic_unwind/seh.rs +++ b/src/libpanic_unwind/seh.rs @@ -54,7 +54,7 @@ //! [win64]: http://msdn.microsoft.com/en-us/library/1eyas8tf.aspx //! [llvm]: http://llvm.org/docs/ExceptionHandling.html#background-on-windows-exceptions -#![allow(bad_style)] +#![allow(nonstandard_style)] #![allow(private_no_mangle_fns)] use alloc::boxed::Box; diff --git a/src/libpanic_unwind/seh64_gnu.rs b/src/libpanic_unwind/seh64_gnu.rs index 0b08e54c6739a..c2074db00385b 100644 --- a/src/libpanic_unwind/seh64_gnu.rs +++ b/src/libpanic_unwind/seh64_gnu.rs @@ -11,7 +11,7 @@ //! Unwinding implementation of top of native Win64 SEH, //! however the unwind handler data (aka LSDA) uses GCC-compatible encoding. -#![allow(bad_style)] +#![allow(nonstandard_style)] #![allow(private_no_mangle_fns)] use alloc::boxed::Box; diff --git a/src/libpanic_unwind/windows.rs b/src/libpanic_unwind/windows.rs index 5f1dda36a889e..0a1c9b3adf183 100644 --- a/src/libpanic_unwind/windows.rs +++ b/src/libpanic_unwind/windows.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![allow(bad_style)] +#![allow(nonstandard_style)] #![allow(dead_code)] #![cfg(windows)] diff --git a/src/librustc/ty/query/plumbing.rs b/src/librustc/ty/query/plumbing.rs index 8473e4af40e3b..0edb1aa79e745 100644 --- a/src/librustc/ty/query/plumbing.rs +++ b/src/librustc/ty/query/plumbing.rs @@ -718,7 +718,7 @@ macro_rules! define_queries_inner { } } - #[allow(bad_style)] + #[allow(nonstandard_style)] #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] pub enum Query<$tcx> { $($(#[$attr])* $name($K)),* @@ -775,7 +775,7 @@ macro_rules! define_queries_inner { pub mod queries { use std::marker::PhantomData; - $(#[allow(bad_style)] + $(#[allow(nonstandard_style)] pub struct $name<$tcx> { data: PhantomData<&$tcx ()> })* diff --git a/src/librustc/util/common.rs b/src/librustc/util/common.rs index bdfba7c3e3a37..02bdc5f41b354 100644 --- a/src/librustc/util/common.rs +++ b/src/librustc/util/common.rs @@ -84,7 +84,7 @@ pub struct ProfQDumpParams { pub dump_profq_msg_log:bool, } -#[allow(bad_style)] +#[allow(nonstandard_style)] #[derive(Clone, Debug, PartialEq, Eq)] pub struct QueryMsg { pub query: &'static str, diff --git a/src/librustc/util/profiling.rs b/src/librustc/util/profiling.rs index 74ff1a5f4fd0d..70760d35f7865 100644 --- a/src/librustc/util/profiling.rs +++ b/src/librustc/util/profiling.rs @@ -21,7 +21,7 @@ macro_rules! define_categories { $($name),* } - #[allow(bad_style)] + #[allow(nonstandard_style)] struct Categories { $($name: T),* } diff --git a/src/librustc_data_structures/flock.rs b/src/librustc_data_structures/flock.rs index 3f248dadb66c1..f10a9a68bed5b 100644 --- a/src/librustc_data_structures/flock.rs +++ b/src/librustc_data_structures/flock.rs @@ -239,7 +239,7 @@ mod imp { } #[cfg(windows)] -#[allow(bad_style)] +#[allow(nonstandard_style)] mod imp { use std::io; use std::mem; diff --git a/src/librustc_errors/lock.rs b/src/librustc_errors/lock.rs index dff8d53986db5..e5baf93b00064 100644 --- a/src/librustc_errors/lock.rs +++ b/src/librustc_errors/lock.rs @@ -22,7 +22,7 @@ use std::any::Any; #[cfg(windows)] -#[allow(bad_style)] +#[allow(nonstandard_style)] pub fn acquire_global_lock(name: &str) -> Box { use std::ffi::CString; use std::io; diff --git a/src/librustc_lint/builtin.rs b/src/librustc_lint/builtin.rs index c497627415f1a..acce4bc0650af 100644 --- a/src/librustc_lint/builtin.rs +++ b/src/librustc_lint/builtin.rs @@ -54,7 +54,7 @@ use syntax::errors::{Applicability, DiagnosticBuilder}; use rustc::hir::{self, GenericParamKind, PatKind}; use rustc::hir::intravisit::FnKind; -use bad_style::{MethodLateContext, method_context}; +use nonstandard_style::{MethodLateContext, method_context}; // hardwired lints from librustc pub use lint::builtin::*; diff --git a/src/librustc_lint/lib.rs b/src/librustc_lint/lib.rs index 05b11e3ba3a4c..0fcf0ca30c136 100644 --- a/src/librustc_lint/lib.rs +++ b/src/librustc_lint/lib.rs @@ -62,12 +62,12 @@ use syntax::edition::Edition; use lint::LintId; use lint::FutureIncompatibleInfo; -mod bad_style; +mod nonstandard_style; pub mod builtin; mod types; mod unused; -use bad_style::*; +use nonstandard_style::*; use builtin::*; use types::*; use unused::*; diff --git a/src/librustc_lint/bad_style.rs b/src/librustc_lint/nonstandard_style.rs similarity index 100% rename from src/librustc_lint/bad_style.rs rename to src/librustc_lint/nonstandard_style.rs diff --git a/src/librustc_platform_intrinsics/lib.rs b/src/librustc_platform_intrinsics/lib.rs index 62405150cd29a..f093d672498ad 100644 --- a/src/librustc_platform_intrinsics/lib.rs +++ b/src/librustc_platform_intrinsics/lib.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![allow(bad_style)] +#![allow(nonstandard_style)] #![cfg_attr(not(stage0), feature(nll))] #![cfg_attr(not(stage0), feature(infer_outlives_requirements))] diff --git a/src/libstd/os/mod.rs b/src/libstd/os/mod.rs index c384ec9168ac4..6d8298f01cdce 100644 --- a/src/libstd/os/mod.rs +++ b/src/libstd/os/mod.rs @@ -11,7 +11,7 @@ //! OS-specific functionality. #![stable(feature = "os", since = "1.0.0")] -#![allow(missing_docs, bad_style, missing_debug_implementations)] +#![allow(missing_docs, nonstandard_style, missing_debug_implementations)] cfg_if! { if #[cfg(dox)] { diff --git a/src/libstd/sys/redox/mod.rs b/src/libstd/sys/redox/mod.rs index 4352b72c30773..f943257c68733 100644 --- a/src/libstd/sys/redox/mod.rs +++ b/src/libstd/sys/redox/mod.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![allow(dead_code, missing_docs, bad_style)] +#![allow(dead_code, missing_docs, nonstandard_style)] use io::{self, ErrorKind}; diff --git a/src/libstd/sys/unix/mod.rs b/src/libstd/sys/unix/mod.rs index c738003caf1d9..2b9fbc9ef3945 100644 --- a/src/libstd/sys/unix/mod.rs +++ b/src/libstd/sys/unix/mod.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![allow(missing_docs, bad_style)] +#![allow(missing_docs, nonstandard_style)] use io::{self, ErrorKind}; use libc; diff --git a/src/libstd/sys/wasm/net.rs b/src/libstd/sys/wasm/net.rs index e7476ab37f7c8..03a5b2d779e1f 100644 --- a/src/libstd/sys/wasm/net.rs +++ b/src/libstd/sys/wasm/net.rs @@ -297,7 +297,7 @@ pub fn lookup_host(_: &str) -> io::Result { unsupported() } -#[allow(bad_style)] +#[allow(nonstandard_style)] pub mod netc { pub const AF_INET: u8 = 0; pub const AF_INET6: u8 = 1; diff --git a/src/libstd/sys/windows/c.rs b/src/libstd/sys/windows/c.rs index e514a56dcc436..8a744519e9175 100644 --- a/src/libstd/sys/windows/c.rs +++ b/src/libstd/sys/windows/c.rs @@ -10,7 +10,7 @@ //! C definitions used by libnative that don't belong in liblibc -#![allow(bad_style)] +#![allow(nonstandard_style)] #![cfg_attr(test, allow(dead_code))] #![unstable(issue = "0", feature = "windows_c")] diff --git a/src/libstd/sys/windows/mod.rs b/src/libstd/sys/windows/mod.rs index ccf79de909fa9..31ef9fa2bedfd 100644 --- a/src/libstd/sys/windows/mod.rs +++ b/src/libstd/sys/windows/mod.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![allow(missing_docs, bad_style)] +#![allow(missing_docs, nonstandard_style)] use ptr; use ffi::{OsStr, OsString}; diff --git a/src/libstd/sys/windows/os.rs b/src/libstd/sys/windows/os.rs index b94482435597e..29ea82c2053cd 100644 --- a/src/libstd/sys/windows/os.rs +++ b/src/libstd/sys/windows/os.rs @@ -10,7 +10,7 @@ //! Implementation of `std::os` functionality for Windows -#![allow(bad_style)] +#![allow(nonstandard_style)] use os::windows::prelude::*; diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs index 29d7cfd2a3a21..d993c6244fc16 100644 --- a/src/libtest/lib.rs +++ b/src/libtest/lib.rs @@ -1184,7 +1184,7 @@ fn get_concurrency() -> usize { }; #[cfg(windows)] - #[allow(bad_style)] + #[allow(nonstandard_style)] fn num_cpus() -> usize { #[repr(C)] struct SYSTEM_INFO { diff --git a/src/libunwind/libunwind.rs b/src/libunwind/libunwind.rs index 73a259bd4438e..43c3e1e766623 100644 --- a/src/libunwind/libunwind.rs +++ b/src/libunwind/libunwind.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![allow(bad_style)] +#![allow(nonstandard_style)] macro_rules! cfg_if { ( $( if #[cfg( $meta:meta )] { $($it1:item)* } else { $($it2:item)* } )* ) => diff --git a/src/test/run-pass/simd-target-feature-mixup.rs b/src/test/run-pass/simd-target-feature-mixup.rs index 139da04645264..a7fd9f299c033 100644 --- a/src/test/run-pass/simd-target-feature-mixup.rs +++ b/src/test/run-pass/simd-target-feature-mixup.rs @@ -52,7 +52,7 @@ fn is_sigill(status: ExitStatus) -> bool { } #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] -#[allow(bad_style)] +#[allow(nonstandard_style)] mod test { // An SSE type #[repr(simd)] diff --git a/src/test/rustdoc/intra-links.rs b/src/test/rustdoc/intra-links.rs index c822d0f8b21b8..81b81a9a141da 100644 --- a/src/test/rustdoc/intra-links.rs +++ b/src/test/rustdoc/intra-links.rs @@ -75,7 +75,7 @@ pub static THIS_STATIC: usize = 5usize; pub trait SoAmbiguous {} -#[allow(bad_style)] +#[allow(nonstandard_style)] pub fn SoAmbiguous() {} diff --git a/src/test/ui/lint/lint-group-style.rs b/src/test/ui/lint/lint-group-style.rs index 9f33f57f48a28..55d6168e6e008 100644 --- a/src/test/ui/lint/lint-group-style.rs +++ b/src/test/ui/lint/lint-group-style.rs @@ -8,16 +8,16 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![deny(bad_style)] +#![deny(nonstandard_style)] #![allow(dead_code)] fn CamelCase() {} //~ ERROR should have a snake -#[allow(bad_style)] +#[allow(nonstandard_style)] mod test { fn CamelCase() {} - #[forbid(bad_style)] + #[forbid(nonstandard_style)] mod bad { fn CamelCase() {} //~ ERROR should have a snake @@ -25,7 +25,7 @@ mod test { } mod warn { - #![warn(bad_style)] + #![warn(nonstandard_style)] fn CamelCase() {} //~ WARN should have a snake diff --git a/src/test/ui/lint/lint-group-style.stderr b/src/test/ui/lint/lint-group-style.stderr index c1b15160bc501..6b91ce5b93ca6 100644 --- a/src/test/ui/lint/lint-group-style.stderr +++ b/src/test/ui/lint/lint-group-style.stderr @@ -7,9 +7,9 @@ LL | fn CamelCase() {} //~ ERROR should have a snake note: lint level defined here --> $DIR/lint-group-style.rs:11:9 | -LL | #![deny(bad_style)] - | ^^^^^^^^^ - = note: #[deny(non_snake_case)] implied by #[deny(bad_style)] +LL | #![deny(nonstandard_style)] + | ^^^^^^^^^^^^^^^^^ + = note: #[deny(non_snake_case)] implied by #[deny(nonstandard_style)] error: function `CamelCase` should have a snake case name such as `camel_case` --> $DIR/lint-group-style.rs:22:9 @@ -20,9 +20,9 @@ LL | fn CamelCase() {} //~ ERROR should have a snake note: lint level defined here --> $DIR/lint-group-style.rs:20:14 | -LL | #[forbid(bad_style)] - | ^^^^^^^^^ - = note: #[forbid(non_snake_case)] implied by #[forbid(bad_style)] +LL | #[forbid(nonstandard_style)] + | ^^^^^^^^^^^^^^^^^ + = note: #[forbid(non_snake_case)] implied by #[forbid(nonstandard_style)] error: static variable `bad` should have an upper case name such as `BAD` --> $DIR/lint-group-style.rs:24:9 @@ -33,9 +33,9 @@ LL | static bad: isize = 1; //~ ERROR should have an upper note: lint level defined here --> $DIR/lint-group-style.rs:20:14 | -LL | #[forbid(bad_style)] - | ^^^^^^^^^ - = note: #[forbid(non_upper_case_globals)] implied by #[forbid(bad_style)] +LL | #[forbid(nonstandard_style)] + | ^^^^^^^^^^^^^^^^^ + = note: #[forbid(non_upper_case_globals)] implied by #[forbid(nonstandard_style)] warning: function `CamelCase` should have a snake case name such as `camel_case` --> $DIR/lint-group-style.rs:30:9 @@ -46,9 +46,9 @@ LL | fn CamelCase() {} //~ WARN should have a snake note: lint level defined here --> $DIR/lint-group-style.rs:28:17 | -LL | #![warn(bad_style)] - | ^^^^^^^^^ - = note: #[warn(non_snake_case)] implied by #[warn(bad_style)] +LL | #![warn(nonstandard_style)] + | ^^^^^^^^^^^^^^^^^ + = note: #[warn(non_snake_case)] implied by #[warn(nonstandard_style)] warning: type `snake_case` should have a camel case name such as `SnakeCase` --> $DIR/lint-group-style.rs:32:9 @@ -59,9 +59,9 @@ LL | struct snake_case; //~ WARN should have a camel note: lint level defined here --> $DIR/lint-group-style.rs:28:17 | -LL | #![warn(bad_style)] - | ^^^^^^^^^ - = note: #[warn(non_camel_case_types)] implied by #[warn(bad_style)] +LL | #![warn(nonstandard_style)] + | ^^^^^^^^^^^^^^^^^ + = note: #[warn(non_camel_case_types)] implied by #[warn(nonstandard_style)] error: aborting due to 3 previous errors diff --git a/src/test/ui/lint/lint-shorthand-field.rs b/src/test/ui/lint/lint-shorthand-field.rs index 97a976a493f80..1e37ac0dc586c 100644 --- a/src/test/ui/lint/lint-shorthand-field.rs +++ b/src/test/ui/lint/lint-shorthand-field.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![allow(bad_style, unused_variables)] +#![allow(nonstandard_style, unused_variables)] #![deny(non_shorthand_field_patterns)] struct Foo { diff --git a/src/test/ui/lint/outer-forbid.rs b/src/test/ui/lint/outer-forbid.rs index d72f307b46124..23e98cc22fc3a 100644 --- a/src/test/ui/lint/outer-forbid.rs +++ b/src/test/ui/lint/outer-forbid.rs @@ -11,7 +11,7 @@ // Forbidding a group (here, `unused`) overrules subsequent allowance of both // the group, and an individual lint in the group (here, `unused_variables`); // and, forbidding an individual lint (here, `non_snake_case`) overrules -// subsequent allowance of a lint group containing it (here, `bad_style`). See +// subsequent allowance of a lint group containing it (here, `nonstandard_style`). See // Issue #42873. #![forbid(unused, non_snake_case)] @@ -22,7 +22,7 @@ fn foo() {} #[allow(unused)] //~ ERROR overruled fn bar() {} -#[allow(bad_style)] //~ ERROR overruled +#[allow(nonstandard_style)] //~ ERROR overruled fn main() { println!("hello forbidden world") } diff --git a/src/test/ui/lint/outer-forbid.stderr b/src/test/ui/lint/outer-forbid.stderr index e49dcd4a2d19d..c011b49eaee7d 100644 --- a/src/test/ui/lint/outer-forbid.stderr +++ b/src/test/ui/lint/outer-forbid.stderr @@ -16,14 +16,14 @@ LL | #![forbid(unused, non_snake_case)] LL | #[allow(unused)] //~ ERROR overruled | ^^^^^^ overruled by previous forbid -error[E0453]: allow(bad_style) overruled by outer forbid(non_snake_case) +error[E0453]: allow(nonstandard_style) overruled by outer forbid(non_snake_case) --> $DIR/outer-forbid.rs:25:9 | LL | #![forbid(unused, non_snake_case)] | -------------- `forbid` level set here ... -LL | #[allow(bad_style)] //~ ERROR overruled - | ^^^^^^^^^ overruled by previous forbid +LL | #[allow(nonstandard_style)] //~ ERROR overruled + | ^^^^^^^^^^^^^^^^^ overruled by previous forbid error: aborting due to 3 previous errors