Skip to content

Commit 9d4ebcd

Browse files
Make lint plural
1 parent 4630f4c commit 9d4ebcd

File tree

7 files changed

+23
-23
lines changed

7 files changed

+23
-23
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5295,7 +5295,7 @@ Released 2018-09-13
52955295
[`almost_complete_letter_range`]: https://rust-lang.github.io/rust-clippy/master/index.html#almost_complete_letter_range
52965296
[`almost_complete_range`]: https://rust-lang.github.io/rust-clippy/master/index.html#almost_complete_range
52975297
[`almost_swapped`]: https://rust-lang.github.io/rust-clippy/master/index.html#almost_swapped
5298-
[`anon_trait_import`]: https://rust-lang.github.io/rust-clippy/master/index.html#anon_trait_import
5298+
[`anon_trait_imports`]: https://rust-lang.github.io/rust-clippy/master/index.html#anon_trait_imports
52995299
[`approx_constant`]: https://rust-lang.github.io/rust-clippy/master/index.html#approx_constant
53005300
[`arc_with_non_send_sync`]: https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
53015301
[`arithmetic_side_effects`]: https://rust-lang.github.io/rust-clippy/master/index.html#arithmetic_side_effects

clippy_lints/src/anon_trait_import.rs renamed to clippy_lints/src/anon_trait_imports.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,26 +41,26 @@ declare_clippy_lint! {
4141
/// }
4242
/// ```
4343
#[clippy::version = "1.82.0"]
44-
pub ANON_TRAIT_IMPORT,
44+
pub ANON_TRAIT_IMPORTS,
4545
nursery,
4646
"use items that import a trait but only use it anonymously"
4747
}
4848

49-
pub struct AnonTraitImport {
49+
pub struct AnonTraitImports {
5050
msrv: Msrv,
5151
}
5252

53-
impl AnonTraitImport {
53+
impl AnonTraitImports {
5454
pub fn new(conf: &'static Conf) -> Self {
5555
Self {
5656
msrv: conf.msrv.clone(),
5757
}
5858
}
5959
}
6060

61-
impl_lint_pass!(AnonTraitImport => [ANON_TRAIT_IMPORT]);
61+
impl_lint_pass!(AnonTraitImports => [ANON_TRAIT_IMPORTS]);
6262

63-
impl<'tcx> LateLintPass<'tcx> for AnonTraitImport {
63+
impl<'tcx> LateLintPass<'tcx> for AnonTraitImports {
6464
fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'tcx>) {
6565
if self.msrv.meets(msrvs::UNDERSCORE_IMPORTS)
6666
&& !in_external_macro(cx.sess(), item.span)
@@ -80,7 +80,7 @@ impl<'tcx> LateLintPass<'tcx> for AnonTraitImport {
8080
let complete_span = last_segment.ident.span.to(item.ident.span);
8181
span_lint_and_sugg(
8282
cx,
83-
ANON_TRAIT_IMPORT,
83+
ANON_TRAIT_IMPORTS,
8484
complete_span,
8585
"importing trait that is only used anonymously",
8686
"use",

clippy_lints/src/declared_lints.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ pub static LINTS: &[&crate::LintInfo] = &[
3333
crate::utils::internal_lints::unsorted_clippy_utils_paths::UNSORTED_CLIPPY_UTILS_PATHS_INFO,
3434
crate::absolute_paths::ABSOLUTE_PATHS_INFO,
3535
crate::almost_complete_range::ALMOST_COMPLETE_RANGE_INFO,
36-
crate::anon_trait_import::ANON_TRAIT_IMPORT_INFO,
36+
crate::anon_trait_imports::ANON_TRAIT_IMPORTS_INFO,
3737
crate::approx_const::APPROX_CONSTANT_INFO,
3838
crate::arc_with_non_send_sync::ARC_WITH_NON_SEND_SYNC_INFO,
3939
crate::as_conversions::AS_CONVERSIONS_INFO,

clippy_lints/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ pub mod deprecated_lints;
7272
// begin lints modules, do not remove this comment, it’s used in `update_lints`
7373
mod absolute_paths;
7474
mod almost_complete_range;
75-
mod anon_trait_import;
75+
mod anon_trait_imports;
7676
mod approx_const;
7777
mod arc_with_non_send_sync;
7878
mod as_conversions;
@@ -943,6 +943,6 @@ pub fn register_lints(store: &mut rustc_lint::LintStore, conf: &'static Conf) {
943943
store.register_late_pass(move |_| Box::new(manual_div_ceil::ManualDivCeil::new(conf)));
944944
store.register_late_pass(|_| Box::new(manual_is_power_of_two::ManualIsPowerOfTwo));
945945
store.register_late_pass(|_| Box::new(non_zero_suggestions::NonZeroSuggestions));
946-
store.register_late_pass(move |_| Box::new(anon_trait_import::AnonTraitImport::new(conf)));
946+
store.register_late_pass(move |_| Box::new(anon_trait_imports::AnonTraitImports::new(conf)));
947947
// add lints here, do not remove this comment, it's used in `new_lint`
948948
}

tests/ui/anon_trait_import.fixed renamed to tests/ui/anon_trait_imports.fixed

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//@aux-build:proc_macros.rs
22

33
#![allow(unused)]
4-
#![warn(clippy::anon_trait_import)]
4+
#![warn(clippy::anon_trait_imports)]
55
#![feature(decl_macro)]
66

77
extern crate proc_macros;

tests/ui/anon_trait_import.rs renamed to tests/ui/anon_trait_imports.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//@aux-build:proc_macros.rs
22

33
#![allow(unused)]
4-
#![warn(clippy::anon_trait_import)]
4+
#![warn(clippy::anon_trait_imports)]
55
#![feature(decl_macro)]
66

77
extern crate proc_macros;

tests/ui/anon_trait_import.stderr renamed to tests/ui/anon_trait_imports.stderr

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,56 @@
11
error: importing trait that is only used anonymously
2-
--> tests/ui/anon_trait_import.rs:12:19
2+
--> tests/ui/anon_trait_imports.rs:12:19
33
|
44
LL | use std::any::Any;
55
| ^^^ help: use: `Any as _`
66
|
7-
= note: `-D clippy::anon-trait-import` implied by `-D warnings`
8-
= help: to override `-D warnings` add `#[allow(clippy::anon_trait_import)]`
7+
= note: `-D clippy::anon-trait-imports` implied by `-D warnings`
8+
= help: to override `-D warnings` add `#[allow(clippy::anon_trait_imports)]`
99

1010
error: importing trait that is only used anonymously
11-
--> tests/ui/anon_trait_import.rs:31:26
11+
--> tests/ui/anon_trait_imports.rs:31:26
1212
|
1313
LL | use std::any::{self, Any, TypeId};
1414
| ^^^ help: use: `Any as _`
1515

1616
error: importing trait that is only used anonymously
17-
--> tests/ui/anon_trait_import.rs:43:19
17+
--> tests/ui/anon_trait_imports.rs:43:19
1818
|
1919
LL | use std::any::Any as MyAny;
2020
| ^^^^^^^^^^^^ help: use: `Any as _`
2121

2222
error: importing trait that is only used anonymously
23-
--> tests/ui/anon_trait_import.rs:49:20
23+
--> tests/ui/anon_trait_imports.rs:49:20
2424
|
2525
LL | use std::any::{Any as MyAny, TypeId as MyTypeId};
2626
| ^^^^^^^^^^^^ help: use: `Any as _`
2727

2828
error: importing trait that is only used anonymously
29-
--> tests/ui/anon_trait_import.rs:72:23
29+
--> tests/ui/anon_trait_imports.rs:72:23
3030
|
3131
LL | use std::any::Any;
3232
| ^^^ help: use: `Any as _`
3333

3434
error: importing trait that is only used anonymously
35-
--> tests/ui/anon_trait_import.rs:113:19
35+
--> tests/ui/anon_trait_imports.rs:113:19
3636
|
3737
LL | use std::any::Any;
3838
| ^^^ help: use: `Any as _`
3939

4040
error: importing trait that is only used anonymously
41-
--> tests/ui/anon_trait_import.rs:132:19
41+
--> tests/ui/anon_trait_imports.rs:132:19
4242
|
4343
LL | use std::any::Any;
4444
| ^^^ help: use: `Any as _`
4545

4646
error: importing trait that is only used anonymously
47-
--> tests/ui/anon_trait_import.rs:191:34
47+
--> tests/ui/anon_trait_imports.rs:191:34
4848
|
4949
LL | use simple_trait::{MyStruct, MyTrait};
5050
| ^^^^^^^ help: use: `MyTrait as _`
5151

5252
error: importing trait that is only used anonymously
53-
--> tests/ui/anon_trait_import.rs:198:27
53+
--> tests/ui/anon_trait_imports.rs:198:27
5454
|
5555
LL | use std::any::Any;
5656
| ^^^ help: use: `Any as _`

0 commit comments

Comments
 (0)