Pluralize disallowed_type lint filenames

This way they match up with the pluralized lint name as well.
This commit is contained in:
Philipp Hansch 2021-11-17 07:47:43 +01:00 committed by flip1995
parent b7f18916fa
commit a0d81d1327
No known key found for this signature in database
GPG Key ID: 1CA0DF2AF59D68A5
7 changed files with 25 additions and 25 deletions

View File

@ -99,7 +99,7 @@ store.register_lints(&[
derive::UNSAFE_DERIVE_DESERIALIZE, derive::UNSAFE_DERIVE_DESERIALIZE,
disallowed_method::DISALLOWED_METHOD, disallowed_method::DISALLOWED_METHOD,
disallowed_script_idents::DISALLOWED_SCRIPT_IDENTS, disallowed_script_idents::DISALLOWED_SCRIPT_IDENTS,
disallowed_type::DISALLOWED_TYPES, disallowed_types::DISALLOWED_TYPES,
doc::DOC_MARKDOWN, doc::DOC_MARKDOWN,
doc::MISSING_ERRORS_DOC, doc::MISSING_ERRORS_DOC,
doc::MISSING_PANICS_DOC, doc::MISSING_PANICS_DOC,

View File

@ -7,7 +7,7 @@ store.register_group(true, "clippy::nursery", Some("clippy_nursery"), vec![
LintId::of(cognitive_complexity::COGNITIVE_COMPLEXITY), LintId::of(cognitive_complexity::COGNITIVE_COMPLEXITY),
LintId::of(copies::BRANCHES_SHARING_CODE), LintId::of(copies::BRANCHES_SHARING_CODE),
LintId::of(disallowed_method::DISALLOWED_METHOD), LintId::of(disallowed_method::DISALLOWED_METHOD),
LintId::of(disallowed_type::DISALLOWED_TYPES), LintId::of(disallowed_types::DISALLOWED_TYPES),
LintId::of(equatable_if_let::EQUATABLE_IF_LET), LintId::of(equatable_if_let::EQUATABLE_IF_LET),
LintId::of(fallible_impl_from::FALLIBLE_IMPL_FROM), LintId::of(fallible_impl_from::FALLIBLE_IMPL_FROM),
LintId::of(floating_point_arithmetic::IMPRECISE_FLOPS), LintId::of(floating_point_arithmetic::IMPRECISE_FLOPS),

View File

@ -196,7 +196,7 @@ mod derivable_impls;
mod derive; mod derive;
mod disallowed_method; mod disallowed_method;
mod disallowed_script_idents; mod disallowed_script_idents;
mod disallowed_type; mod disallowed_types;
mod doc; mod doc;
mod double_comparison; mod double_comparison;
mod double_parens; mod double_parens;
@ -827,7 +827,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
store.register_early_pass(move || Box::new(module_style::ModStyle)); store.register_early_pass(move || Box::new(module_style::ModStyle));
store.register_late_pass(|| Box::new(unused_async::UnusedAsync)); store.register_late_pass(|| Box::new(unused_async::UnusedAsync));
let disallowed_types = conf.disallowed_types.clone(); let disallowed_types = conf.disallowed_types.clone();
store.register_late_pass(move || Box::new(disallowed_type::DisallowedTypes::new(disallowed_types.clone()))); store.register_late_pass(move || Box::new(disallowed_types::DisallowedTypes::new(disallowed_types.clone())));
let import_renames = conf.enforced_import_renames.clone(); let import_renames = conf.enforced_import_renames.clone();
store.register_late_pass(move || { store.register_late_pass(move || {
Box::new(missing_enforced_import_rename::ImportRename::new( Box::new(missing_enforced_import_rename::ImportRename::new(

View File

@ -1,5 +1,5 @@
error: `std::sync::atomic::AtomicU32` is not allowed according to config error: `std::sync::atomic::AtomicU32` is not allowed according to config
--> $DIR/conf_disallowed_type.rs:7:1 --> $DIR/conf_disallowed_types.rs:7:1
| |
LL | use std::sync::atomic::AtomicU32; LL | use std::sync::atomic::AtomicU32;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -7,61 +7,61 @@ LL | use std::sync::atomic::AtomicU32;
= note: `-D clippy::disallowed-types` implied by `-D warnings` = note: `-D clippy::disallowed-types` implied by `-D warnings`
error: `std::time::Instant` is not allowed according to config error: `std::time::Instant` is not allowed according to config
--> $DIR/conf_disallowed_type.rs:8:1 --> $DIR/conf_disallowed_types.rs:8:1
| |
LL | use std::time::Instant as Sneaky; LL | use std::time::Instant as Sneaky;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: `std::time::Instant` is not allowed according to config error: `std::time::Instant` is not allowed according to config
--> $DIR/conf_disallowed_type.rs:12:33 --> $DIR/conf_disallowed_types.rs:12:33
| |
LL | fn bad_return_type() -> fn() -> Sneaky { LL | fn bad_return_type() -> fn() -> Sneaky {
| ^^^^^^ | ^^^^^^
error: `std::time::Instant` is not allowed according to config error: `std::time::Instant` is not allowed according to config
--> $DIR/conf_disallowed_type.rs:16:28 --> $DIR/conf_disallowed_types.rs:16:28
| |
LL | fn bad_arg_type(_: impl Fn(Sneaky) -> foo::atomic::AtomicU32) {} LL | fn bad_arg_type(_: impl Fn(Sneaky) -> foo::atomic::AtomicU32) {}
| ^^^^^^ | ^^^^^^
error: `std::sync::atomic::AtomicU32` is not allowed according to config error: `std::sync::atomic::AtomicU32` is not allowed according to config
--> $DIR/conf_disallowed_type.rs:16:39 --> $DIR/conf_disallowed_types.rs:16:39
| |
LL | fn bad_arg_type(_: impl Fn(Sneaky) -> foo::atomic::AtomicU32) {} LL | fn bad_arg_type(_: impl Fn(Sneaky) -> foo::atomic::AtomicU32) {}
| ^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^
error: `std::io::Read` is not allowed according to config error: `std::io::Read` is not allowed according to config
--> $DIR/conf_disallowed_type.rs:18:22 --> $DIR/conf_disallowed_types.rs:18:22
| |
LL | fn trait_obj(_: &dyn std::io::Read) {} LL | fn trait_obj(_: &dyn std::io::Read) {}
| ^^^^^^^^^^^^^ | ^^^^^^^^^^^^^
error: `usize` is not allowed according to config error: `usize` is not allowed according to config
--> $DIR/conf_disallowed_type.rs:20:33 --> $DIR/conf_disallowed_types.rs:20:33
| |
LL | fn full_and_single_path_prim(_: usize, _: bool) {} LL | fn full_and_single_path_prim(_: usize, _: bool) {}
| ^^^^^ | ^^^^^
error: `bool` is not allowed according to config error: `bool` is not allowed according to config
--> $DIR/conf_disallowed_type.rs:20:43 --> $DIR/conf_disallowed_types.rs:20:43
| |
LL | fn full_and_single_path_prim(_: usize, _: bool) {} LL | fn full_and_single_path_prim(_: usize, _: bool) {}
| ^^^^ | ^^^^
error: `usize` is not allowed according to config error: `usize` is not allowed according to config
--> $DIR/conf_disallowed_type.rs:22:28 --> $DIR/conf_disallowed_types.rs:22:28
| |
LL | fn const_generics<const C: usize>() {} LL | fn const_generics<const C: usize>() {}
| ^^^^^ | ^^^^^
error: `usize` is not allowed according to config error: `usize` is not allowed according to config
--> $DIR/conf_disallowed_type.rs:24:24 --> $DIR/conf_disallowed_types.rs:24:24
| |
LL | struct GenArg<const U: usize>([u8; U]); LL | struct GenArg<const U: usize>([u8; U]);
| ^^^^^ | ^^^^^
error: `std::net::Ipv4Addr` is not allowed according to config error: `std::net::Ipv4Addr` is not allowed according to config
--> $DIR/conf_disallowed_type.rs:28:10 --> $DIR/conf_disallowed_types.rs:28:10
| |
LL | fn ip(_: std::net::Ipv4Addr) {} LL | fn ip(_: std::net::Ipv4Addr) {}
| ^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^
@ -69,61 +69,61 @@ LL | fn ip(_: std::net::Ipv4Addr) {}
= note: no IPv4 allowed (from clippy.toml) = note: no IPv4 allowed (from clippy.toml)
error: `std::net::TcpListener` is not allowed according to config error: `std::net::TcpListener` is not allowed according to config
--> $DIR/conf_disallowed_type.rs:30:16 --> $DIR/conf_disallowed_types.rs:30:16
| |
LL | fn listener(_: std::net::TcpListener) {} LL | fn listener(_: std::net::TcpListener) {}
| ^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^
error: `std::collections::HashMap` is not allowed according to config error: `std::collections::HashMap` is not allowed according to config
--> $DIR/conf_disallowed_type.rs:34:48 --> $DIR/conf_disallowed_types.rs:34:48
| |
LL | let _: std::collections::HashMap<(), ()> = std::collections::HashMap::new(); LL | let _: std::collections::HashMap<(), ()> = std::collections::HashMap::new();
| ^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^
error: `std::collections::HashMap` is not allowed according to config error: `std::collections::HashMap` is not allowed according to config
--> $DIR/conf_disallowed_type.rs:34:12 --> $DIR/conf_disallowed_types.rs:34:12
| |
LL | let _: std::collections::HashMap<(), ()> = std::collections::HashMap::new(); LL | let _: std::collections::HashMap<(), ()> = std::collections::HashMap::new();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: `std::time::Instant` is not allowed according to config error: `std::time::Instant` is not allowed according to config
--> $DIR/conf_disallowed_type.rs:35:13 --> $DIR/conf_disallowed_types.rs:35:13
| |
LL | let _ = Sneaky::now(); LL | let _ = Sneaky::now();
| ^^^^^^ | ^^^^^^
error: `std::sync::atomic::AtomicU32` is not allowed according to config error: `std::sync::atomic::AtomicU32` is not allowed according to config
--> $DIR/conf_disallowed_type.rs:36:13 --> $DIR/conf_disallowed_types.rs:36:13
| |
LL | let _ = foo::atomic::AtomicU32::new(0); LL | let _ = foo::atomic::AtomicU32::new(0);
| ^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^
error: `std::sync::atomic::AtomicU32` is not allowed according to config error: `std::sync::atomic::AtomicU32` is not allowed according to config
--> $DIR/conf_disallowed_type.rs:37:17 --> $DIR/conf_disallowed_types.rs:37:17
| |
LL | static FOO: std::sync::atomic::AtomicU32 = foo::atomic::AtomicU32::new(1); LL | static FOO: std::sync::atomic::AtomicU32 = foo::atomic::AtomicU32::new(1);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: `std::sync::atomic::AtomicU32` is not allowed according to config error: `std::sync::atomic::AtomicU32` is not allowed according to config
--> $DIR/conf_disallowed_type.rs:37:48 --> $DIR/conf_disallowed_types.rs:37:48
| |
LL | static FOO: std::sync::atomic::AtomicU32 = foo::atomic::AtomicU32::new(1); LL | static FOO: std::sync::atomic::AtomicU32 = foo::atomic::AtomicU32::new(1);
| ^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^
error: `syn::TypePath` is not allowed according to config error: `syn::TypePath` is not allowed according to config
--> $DIR/conf_disallowed_type.rs:38:43 --> $DIR/conf_disallowed_types.rs:38:43
| |
LL | let _: std::collections::BTreeMap<(), syn::TypePath> = Default::default(); LL | let _: std::collections::BTreeMap<(), syn::TypePath> = Default::default();
| ^^^^^^^^^^^^^ | ^^^^^^^^^^^^^
error: `syn::Ident` is not allowed according to config error: `syn::Ident` is not allowed according to config
--> $DIR/conf_disallowed_type.rs:39:13 --> $DIR/conf_disallowed_types.rs:39:13
| |
LL | let _ = syn::Ident::new("", todo!()); LL | let _ = syn::Ident::new("", todo!());
| ^^^^^^^^^^ | ^^^^^^^^^^
error: `usize` is not allowed according to config error: `usize` is not allowed according to config
--> $DIR/conf_disallowed_type.rs:41:12 --> $DIR/conf_disallowed_types.rs:41:12
| |
LL | let _: usize = 64_usize; LL | let _: usize = 64_usize;
| ^^^^^ | ^^^^^