Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Pluralize disallowed_type lint filenames
This way they match up with the pluralized lint name as well.
  • Loading branch information
phansch authored and flip1995 committed Nov 18, 2021
1 parent b7f1891 commit a0d81d1
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 25 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion clippy_lints/src/lib.register_lints.rs
Expand Up @@ -99,7 +99,7 @@ store.register_lints(&[
derive::UNSAFE_DERIVE_DESERIALIZE,
disallowed_method::DISALLOWED_METHOD,
disallowed_script_idents::DISALLOWED_SCRIPT_IDENTS,
disallowed_type::DISALLOWED_TYPES,
disallowed_types::DISALLOWED_TYPES,
doc::DOC_MARKDOWN,
doc::MISSING_ERRORS_DOC,
doc::MISSING_PANICS_DOC,
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/lib.register_nursery.rs
Expand Up @@ -7,7 +7,7 @@ store.register_group(true, "clippy::nursery", Some("clippy_nursery"), vec![
LintId::of(cognitive_complexity::COGNITIVE_COMPLEXITY),
LintId::of(copies::BRANCHES_SHARING_CODE),
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(fallible_impl_from::FALLIBLE_IMPL_FROM),
LintId::of(floating_point_arithmetic::IMPRECISE_FLOPS),
Expand Down
4 changes: 2 additions & 2 deletions clippy_lints/src/lib.rs
Expand Up @@ -196,7 +196,7 @@ mod derivable_impls;
mod derive;
mod disallowed_method;
mod disallowed_script_idents;
mod disallowed_type;
mod disallowed_types;
mod doc;
mod double_comparison;
mod double_parens;
Expand Down Expand Up @@ -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_late_pass(|| Box::new(unused_async::UnusedAsync));
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();
store.register_late_pass(move || {
Box::new(missing_enforced_import_rename::ImportRename::new(
Expand Down
@@ -1,129 +1,129 @@
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;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D clippy::disallowed-types` implied by `-D warnings`

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;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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 {
| ^^^^^^

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) {}
| ^^^^^^

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) {}
| ^^^^^^^^^^^^^^^^^^^^^^

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) {}
| ^^^^^^^^^^^^^

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) {}
| ^^^^^

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) {}
| ^^^^

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>() {}
| ^^^^^

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]);
| ^^^^^

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) {}
| ^^^^^^^^^^^^^^^^^^
|
= note: no IPv4 allowed (from clippy.toml)

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) {}
| ^^^^^^^^^^^^^^^^^^^^^

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();
| ^^^^^^^^^^^^^^^^^^^^^^^^^

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();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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();
| ^^^^^^

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);
| ^^^^^^^^^^^^^^^^^^^^^^

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);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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);
| ^^^^^^^^^^^^^^^^^^^^^^

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();
| ^^^^^^^^^^^^^

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!());
| ^^^^^^^^^^

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;
| ^^^^^
Expand Down

0 comments on commit a0d81d1

Please sign in to comment.