Skip to content

Commit 78d5509

Browse files
authored
Rollup merge of rust-lang#53786 - frewsxcv:frewsxcv-bad-style, r=Manishearth
Replace usages of 'bad_style' with 'nonstandard_style'. `bad_style` is being deprecated in favor of `nonstandard_style`: - rust-lang#41646
2 parents 07fcb01 + e477a13 commit 78d5509

File tree

31 files changed

+52
-52
lines changed

31 files changed

+52
-52
lines changed

src/bootstrap/job.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
//! Note that this module has a #[cfg(windows)] above it as none of this logic
3838
//! is required on Unix.
3939
40-
#![allow(bad_style, dead_code)]
40+
#![allow(nonstandard_style, dead_code)]
4141

4242
use std::env;
4343
use std::io;

src/bootstrap/util.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ pub fn symlink_dir(config: &Config, src: &Path, dest: &Path) -> io::Result<()> {
137137
//
138138
// Copied from std
139139
#[cfg(windows)]
140-
#[allow(bad_style)]
140+
#[allow(nonstandard_style)]
141141
fn symlink_dir_inner(target: &Path, junction: &Path) -> io::Result<()> {
142142
use std::ptr;
143143
use std::ffi::OsStr;

src/liballoc_system/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ mod platform {
220220
}
221221

222222
#[cfg(windows)]
223-
#[allow(bad_style)]
223+
#[allow(nonstandard_style)]
224224
mod platform {
225225
use MIN_ALIGN;
226226
use System;

src/libpanic_unwind/seh.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
//! [win64]: http://msdn.microsoft.com/en-us/library/1eyas8tf.aspx
5555
//! [llvm]: http://llvm.org/docs/ExceptionHandling.html#background-on-windows-exceptions
5656
57-
#![allow(bad_style)]
57+
#![allow(nonstandard_style)]
5858
#![allow(private_no_mangle_fns)]
5959

6060
use alloc::boxed::Box;

src/libpanic_unwind/seh64_gnu.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
//! Unwinding implementation of top of native Win64 SEH,
1212
//! however the unwind handler data (aka LSDA) uses GCC-compatible encoding.
1313
14-
#![allow(bad_style)]
14+
#![allow(nonstandard_style)]
1515
#![allow(private_no_mangle_fns)]
1616

1717
use alloc::boxed::Box;

src/libpanic_unwind/windows.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![allow(bad_style)]
11+
#![allow(nonstandard_style)]
1212
#![allow(dead_code)]
1313
#![cfg(windows)]
1414

src/librustc/ty/query/plumbing.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ macro_rules! define_queries_inner {
718718
}
719719
}
720720

721-
#[allow(bad_style)]
721+
#[allow(nonstandard_style)]
722722
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
723723
pub enum Query<$tcx> {
724724
$($(#[$attr])* $name($K)),*
@@ -775,7 +775,7 @@ macro_rules! define_queries_inner {
775775
pub mod queries {
776776
use std::marker::PhantomData;
777777

778-
$(#[allow(bad_style)]
778+
$(#[allow(nonstandard_style)]
779779
pub struct $name<$tcx> {
780780
data: PhantomData<&$tcx ()>
781781
})*

src/librustc/util/common.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ pub struct ProfQDumpParams {
8484
pub dump_profq_msg_log:bool,
8585
}
8686

87-
#[allow(bad_style)]
87+
#[allow(nonstandard_style)]
8888
#[derive(Clone, Debug, PartialEq, Eq)]
8989
pub struct QueryMsg {
9090
pub query: &'static str,

src/librustc/util/profiling.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ macro_rules! define_categories {
2121
$($name),*
2222
}
2323

24-
#[allow(bad_style)]
24+
#[allow(nonstandard_style)]
2525
struct Categories<T> {
2626
$($name: T),*
2727
}

src/librustc_data_structures/flock.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ mod imp {
239239
}
240240

241241
#[cfg(windows)]
242-
#[allow(bad_style)]
242+
#[allow(nonstandard_style)]
243243
mod imp {
244244
use std::io;
245245
use std::mem;

src/librustc_errors/lock.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
use std::any::Any;
2323

2424
#[cfg(windows)]
25-
#[allow(bad_style)]
25+
#[allow(nonstandard_style)]
2626
pub fn acquire_global_lock(name: &str) -> Box<dyn Any> {
2727
use std::ffi::CString;
2828
use std::io;

src/librustc_lint/builtin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ use syntax::errors::{Applicability, DiagnosticBuilder};
5454
use rustc::hir::{self, GenericParamKind, PatKind};
5555
use rustc::hir::intravisit::FnKind;
5656

57-
use bad_style::{MethodLateContext, method_context};
57+
use nonstandard_style::{MethodLateContext, method_context};
5858

5959
// hardwired lints from librustc
6060
pub use lint::builtin::*;

src/librustc_lint/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ use syntax::edition::Edition;
6262
use lint::LintId;
6363
use lint::FutureIncompatibleInfo;
6464

65-
mod bad_style;
65+
mod nonstandard_style;
6666
pub mod builtin;
6767
mod types;
6868
mod unused;
6969

70-
use bad_style::*;
70+
use nonstandard_style::*;
7171
use builtin::*;
7272
use types::*;
7373
use unused::*;
File renamed without changes.

src/librustc_platform_intrinsics/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![allow(bad_style)]
11+
#![allow(nonstandard_style)]
1212

1313
#![cfg_attr(not(stage0), feature(nll))]
1414
#![cfg_attr(not(stage0), feature(infer_outlives_requirements))]

src/libstd/os/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
//! OS-specific functionality.
1212
1313
#![stable(feature = "os", since = "1.0.0")]
14-
#![allow(missing_docs, bad_style, missing_debug_implementations)]
14+
#![allow(missing_docs, nonstandard_style, missing_debug_implementations)]
1515

1616
cfg_if! {
1717
if #[cfg(dox)] {

src/libstd/sys/redox/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![allow(dead_code, missing_docs, bad_style)]
11+
#![allow(dead_code, missing_docs, nonstandard_style)]
1212

1313
use io::{self, ErrorKind};
1414

src/libstd/sys/unix/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![allow(missing_docs, bad_style)]
11+
#![allow(missing_docs, nonstandard_style)]
1212

1313
use io::{self, ErrorKind};
1414
use libc;

src/libstd/sys/wasm/net.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ pub fn lookup_host(_: &str) -> io::Result<LookupHost> {
297297
unsupported()
298298
}
299299

300-
#[allow(bad_style)]
300+
#[allow(nonstandard_style)]
301301
pub mod netc {
302302
pub const AF_INET: u8 = 0;
303303
pub const AF_INET6: u8 = 1;

src/libstd/sys/windows/c.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
//! C definitions used by libnative that don't belong in liblibc
1212
13-
#![allow(bad_style)]
13+
#![allow(nonstandard_style)]
1414
#![cfg_attr(test, allow(dead_code))]
1515
#![unstable(issue = "0", feature = "windows_c")]
1616

src/libstd/sys/windows/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![allow(missing_docs, bad_style)]
11+
#![allow(missing_docs, nonstandard_style)]
1212

1313
use ptr;
1414
use ffi::{OsStr, OsString};

src/libstd/sys/windows/os.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
//! Implementation of `std::os` functionality for Windows
1212
13-
#![allow(bad_style)]
13+
#![allow(nonstandard_style)]
1414

1515
use os::windows::prelude::*;
1616

src/libtest/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1184,7 +1184,7 @@ fn get_concurrency() -> usize {
11841184
};
11851185

11861186
#[cfg(windows)]
1187-
#[allow(bad_style)]
1187+
#[allow(nonstandard_style)]
11881188
fn num_cpus() -> usize {
11891189
#[repr(C)]
11901190
struct SYSTEM_INFO {

src/libunwind/libunwind.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![allow(bad_style)]
11+
#![allow(nonstandard_style)]
1212

1313
macro_rules! cfg_if {
1414
( $( if #[cfg( $meta:meta )] { $($it1:item)* } else { $($it2:item)* } )* ) =>

src/test/run-pass/simd-target-feature-mixup.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ fn is_sigill(status: ExitStatus) -> bool {
5252
}
5353

5454
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
55-
#[allow(bad_style)]
55+
#[allow(nonstandard_style)]
5656
mod test {
5757
// An SSE type
5858
#[repr(simd)]

src/test/rustdoc/intra-links.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ pub static THIS_STATIC: usize = 5usize;
7575

7676
pub trait SoAmbiguous {}
7777

78-
#[allow(bad_style)]
78+
#[allow(nonstandard_style)]
7979
pub fn SoAmbiguous() {}
8080

8181

src/test/ui/lint/lint-group-style.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,24 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![deny(bad_style)]
11+
#![deny(nonstandard_style)]
1212
#![allow(dead_code)]
1313

1414
fn CamelCase() {} //~ ERROR should have a snake
1515

16-
#[allow(bad_style)]
16+
#[allow(nonstandard_style)]
1717
mod test {
1818
fn CamelCase() {}
1919

20-
#[forbid(bad_style)]
20+
#[forbid(nonstandard_style)]
2121
mod bad {
2222
fn CamelCase() {} //~ ERROR should have a snake
2323

2424
static bad: isize = 1; //~ ERROR should have an upper
2525
}
2626

2727
mod warn {
28-
#![warn(bad_style)]
28+
#![warn(nonstandard_style)]
2929

3030
fn CamelCase() {} //~ WARN should have a snake
3131

src/test/ui/lint/lint-group-style.stderr

+15-15
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ LL | fn CamelCase() {} //~ ERROR should have a snake
77
note: lint level defined here
88
--> $DIR/lint-group-style.rs:11:9
99
|
10-
LL | #![deny(bad_style)]
11-
| ^^^^^^^^^
12-
= note: #[deny(non_snake_case)] implied by #[deny(bad_style)]
10+
LL | #![deny(nonstandard_style)]
11+
| ^^^^^^^^^^^^^^^^^
12+
= note: #[deny(non_snake_case)] implied by #[deny(nonstandard_style)]
1313

1414
error: function `CamelCase` should have a snake case name such as `camel_case`
1515
--> $DIR/lint-group-style.rs:22:9
@@ -20,9 +20,9 @@ LL | fn CamelCase() {} //~ ERROR should have a snake
2020
note: lint level defined here
2121
--> $DIR/lint-group-style.rs:20:14
2222
|
23-
LL | #[forbid(bad_style)]
24-
| ^^^^^^^^^
25-
= note: #[forbid(non_snake_case)] implied by #[forbid(bad_style)]
23+
LL | #[forbid(nonstandard_style)]
24+
| ^^^^^^^^^^^^^^^^^
25+
= note: #[forbid(non_snake_case)] implied by #[forbid(nonstandard_style)]
2626

2727
error: static variable `bad` should have an upper case name such as `BAD`
2828
--> $DIR/lint-group-style.rs:24:9
@@ -33,9 +33,9 @@ LL | static bad: isize = 1; //~ ERROR should have an upper
3333
note: lint level defined here
3434
--> $DIR/lint-group-style.rs:20:14
3535
|
36-
LL | #[forbid(bad_style)]
37-
| ^^^^^^^^^
38-
= note: #[forbid(non_upper_case_globals)] implied by #[forbid(bad_style)]
36+
LL | #[forbid(nonstandard_style)]
37+
| ^^^^^^^^^^^^^^^^^
38+
= note: #[forbid(non_upper_case_globals)] implied by #[forbid(nonstandard_style)]
3939

4040
warning: function `CamelCase` should have a snake case name such as `camel_case`
4141
--> $DIR/lint-group-style.rs:30:9
@@ -46,9 +46,9 @@ LL | fn CamelCase() {} //~ WARN should have a snake
4646
note: lint level defined here
4747
--> $DIR/lint-group-style.rs:28:17
4848
|
49-
LL | #![warn(bad_style)]
50-
| ^^^^^^^^^
51-
= note: #[warn(non_snake_case)] implied by #[warn(bad_style)]
49+
LL | #![warn(nonstandard_style)]
50+
| ^^^^^^^^^^^^^^^^^
51+
= note: #[warn(non_snake_case)] implied by #[warn(nonstandard_style)]
5252

5353
warning: type `snake_case` should have a camel case name such as `SnakeCase`
5454
--> $DIR/lint-group-style.rs:32:9
@@ -59,9 +59,9 @@ LL | struct snake_case; //~ WARN should have a camel
5959
note: lint level defined here
6060
--> $DIR/lint-group-style.rs:28:17
6161
|
62-
LL | #![warn(bad_style)]
63-
| ^^^^^^^^^
64-
= note: #[warn(non_camel_case_types)] implied by #[warn(bad_style)]
62+
LL | #![warn(nonstandard_style)]
63+
| ^^^^^^^^^^^^^^^^^
64+
= note: #[warn(non_camel_case_types)] implied by #[warn(nonstandard_style)]
6565

6666
error: aborting due to 3 previous errors
6767

src/test/ui/lint/lint-shorthand-field.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![allow(bad_style, unused_variables)]
11+
#![allow(nonstandard_style, unused_variables)]
1212
#![deny(non_shorthand_field_patterns)]
1313

1414
struct Foo {

src/test/ui/lint/outer-forbid.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// Forbidding a group (here, `unused`) overrules subsequent allowance of both
1212
// the group, and an individual lint in the group (here, `unused_variables`);
1313
// and, forbidding an individual lint (here, `non_snake_case`) overrules
14-
// subsequent allowance of a lint group containing it (here, `bad_style`). See
14+
// subsequent allowance of a lint group containing it (here, `nonstandard_style`). See
1515
// Issue #42873.
1616

1717
#![forbid(unused, non_snake_case)]
@@ -22,7 +22,7 @@ fn foo() {}
2222
#[allow(unused)] //~ ERROR overruled
2323
fn bar() {}
2424

25-
#[allow(bad_style)] //~ ERROR overruled
25+
#[allow(nonstandard_style)] //~ ERROR overruled
2626
fn main() {
2727
println!("hello forbidden world")
2828
}

src/test/ui/lint/outer-forbid.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ LL | #![forbid(unused, non_snake_case)]
1616
LL | #[allow(unused)] //~ ERROR overruled
1717
| ^^^^^^ overruled by previous forbid
1818

19-
error[E0453]: allow(bad_style) overruled by outer forbid(non_snake_case)
19+
error[E0453]: allow(nonstandard_style) overruled by outer forbid(non_snake_case)
2020
--> $DIR/outer-forbid.rs:25:9
2121
|
2222
LL | #![forbid(unused, non_snake_case)]
2323
| -------------- `forbid` level set here
2424
...
25-
LL | #[allow(bad_style)] //~ ERROR overruled
26-
| ^^^^^^^^^ overruled by previous forbid
25+
LL | #[allow(nonstandard_style)] //~ ERROR overruled
26+
| ^^^^^^^^^^^^^^^^^ overruled by previous forbid
2727

2828
error: aborting due to 3 previous errors
2929

0 commit comments

Comments
 (0)