Skip to content

Commit db54d19

Browse files
committed
rename lint files to match lint name
1 parent 84750a8 commit db54d19

File tree

7 files changed

+26
-26
lines changed

7 files changed

+26
-26
lines changed

clippy_lints/src/declared_lints.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,7 @@ pub static LINTS: &[&::declare_clippy_lint::LintInfo] = &[
777777
crate::use_self::USE_SELF_INFO,
778778
crate::useless_concat::USELESS_CONCAT_INFO,
779779
crate::useless_conversion::USELESS_CONVERSION_INFO,
780-
crate::vec::USELESS_VEC_INFO,
780+
crate::useless_vec::USELESS_VEC_INFO,
781781
crate::vec_init_then_push::VEC_INIT_THEN_PUSH_INFO,
782782
crate::visibility::NEEDLESS_PUB_SELF_INFO,
783783
crate::visibility::PUB_WITHOUT_SHORTHAND_INFO,

clippy_lints/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ mod upper_case_acronyms;
391391
mod use_self;
392392
mod useless_concat;
393393
mod useless_conversion;
394-
mod vec;
394+
mod useless_vec;
395395
mod vec_init_then_push;
396396
mod visibility;
397397
mod volatile_composites;
@@ -535,7 +535,7 @@ pub fn register_lint_passes(store: &mut rustc_lint::LintStore, conf: &'static Co
535535
store.register_late_pass(move |_| Box::new(transmute::Transmute::new(conf)));
536536
store.register_late_pass(move |_| Box::new(cognitive_complexity::CognitiveComplexity::new(conf)));
537537
store.register_late_pass(move |_| Box::new(escape::BoxedLocal::new(conf)));
538-
store.register_late_pass(move |_| Box::new(vec::UselessVec::new(conf)));
538+
store.register_late_pass(move |_| Box::new(useless_vec::UselessVec::new(conf)));
539539
store.register_late_pass(move |_| Box::new(panic_unimplemented::PanicUnimplemented::new(conf)));
540540
store.register_late_pass(|_| Box::new(strings::StringLitAsBytes));
541541
store.register_late_pass(|_| Box::new(derive::Derive));

clippy_lints/src/ptr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use rustc_trait_selection::infer::InferCtxtExt as _;
2525
use rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt as _;
2626
use std::{fmt, iter};
2727

28-
use crate::vec::is_allowed_vec_method;
28+
use crate::useless_vec::is_allowed_vec_method;
2929

3030
declare_clippy_lint! {
3131
/// ### What it does
File renamed without changes.
File renamed without changes.
File renamed without changes.

tests/ui/vec.stderr renamed to tests/ui/useless_vec.stderr

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: useless use of `vec!`
2-
--> tests/ui/vec.rs:30:14
2+
--> tests/ui/useless_vec.rs:30:14
33
|
44
LL | on_slice(&vec![]);
55
| ^^^^^^^ help: you can use a slice directly: `&[]`
@@ -8,127 +8,127 @@ LL | on_slice(&vec![]);
88
= help: to override `-D warnings` add `#[allow(clippy::useless_vec)]`
99

1010
error: useless use of `vec!`
11-
--> tests/ui/vec.rs:33:18
11+
--> tests/ui/useless_vec.rs:33:18
1212
|
1313
LL | on_mut_slice(&mut vec![]);
1414
| ^^^^^^^^^^^ help: you can use a slice directly: `&mut []`
1515

1616
error: useless use of `vec!`
17-
--> tests/ui/vec.rs:36:14
17+
--> tests/ui/useless_vec.rs:36:14
1818
|
1919
LL | on_slice(&vec![1, 2]);
2020
| ^^^^^^^^^^^ help: you can use a slice directly: `&[1, 2]`
2121

2222
error: useless use of `vec!`
23-
--> tests/ui/vec.rs:39:18
23+
--> tests/ui/useless_vec.rs:39:18
2424
|
2525
LL | on_mut_slice(&mut vec![1, 2]);
2626
| ^^^^^^^^^^^^^^^ help: you can use a slice directly: `&mut [1, 2]`
2727

2828
error: useless use of `vec!`
29-
--> tests/ui/vec.rs:42:14
29+
--> tests/ui/useless_vec.rs:42:14
3030
|
3131
LL | on_slice(&vec![1, 2]);
3232
| ^^^^^^^^^^^ help: you can use a slice directly: `&[1, 2]`
3333

3434
error: useless use of `vec!`
35-
--> tests/ui/vec.rs:45:18
35+
--> tests/ui/useless_vec.rs:45:18
3636
|
3737
LL | on_mut_slice(&mut vec![1, 2]);
3838
| ^^^^^^^^^^^^^^^ help: you can use a slice directly: `&mut [1, 2]`
3939

4040
error: useless use of `vec!`
41-
--> tests/ui/vec.rs:48:14
41+
--> tests/ui/useless_vec.rs:48:14
4242
|
4343
LL | on_slice(&vec!(1, 2));
4444
| ^^^^^^^^^^^ help: you can use a slice directly: `&[1, 2]`
4545

4646
error: useless use of `vec!`
47-
--> tests/ui/vec.rs:51:18
47+
--> tests/ui/useless_vec.rs:51:18
4848
|
4949
LL | on_mut_slice(&mut vec![1, 2]);
5050
| ^^^^^^^^^^^^^^^ help: you can use a slice directly: `&mut [1, 2]`
5151

5252
error: useless use of `vec!`
53-
--> tests/ui/vec.rs:54:14
53+
--> tests/ui/useless_vec.rs:54:14
5454
|
5555
LL | on_slice(&vec![1; 2]);
5656
| ^^^^^^^^^^^ help: you can use a slice directly: `&[1; 2]`
5757

5858
error: useless use of `vec!`
59-
--> tests/ui/vec.rs:57:18
59+
--> tests/ui/useless_vec.rs:57:18
6060
|
6161
LL | on_mut_slice(&mut vec![1; 2]);
6262
| ^^^^^^^^^^^^^^^ help: you can use a slice directly: `&mut [1; 2]`
6363

6464
error: useless use of `vec!`
65-
--> tests/ui/vec.rs:84:19
65+
--> tests/ui/useless_vec.rs:84:19
6666
|
6767
LL | let _x: i32 = vec![1, 2, 3].iter().sum();
6868
| ^^^^^^^^^^^^^ help: you can use an array directly: `[1, 2, 3]`
6969

7070
error: useless use of `vec!`
71-
--> tests/ui/vec.rs:88:17
71+
--> tests/ui/useless_vec.rs:88:17
7272
|
7373
LL | let mut x = vec![1, 2, 3];
7474
| ^^^^^^^^^^^^^ help: you can use an array directly: `[1, 2, 3]`
7575

7676
error: useless use of `vec!`
77-
--> tests/ui/vec.rs:95:22
77+
--> tests/ui/useless_vec.rs:95:22
7878
|
7979
LL | let _x: &[i32] = &vec![1, 2, 3];
8080
| ^^^^^^^^^^^^^^ help: you can use a slice directly: `&[1, 2, 3]`
8181

8282
error: useless use of `vec!`
83-
--> tests/ui/vec.rs:98:14
83+
--> tests/ui/useless_vec.rs:98:14
8484
|
8585
LL | for _ in vec![1, 2, 3] {}
8686
| ^^^^^^^^^^^^^ help: you can use an array directly: `[1, 2, 3]`
8787

8888
error: useless use of `vec!`
89-
--> tests/ui/vec.rs:138:20
89+
--> tests/ui/useless_vec.rs:138:20
9090
|
9191
LL | for _string in vec![repro!(true), repro!(null)] {
9292
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[repro!(true), repro!(null)]`
9393

9494
error: useless use of `vec!`
95-
--> tests/ui/vec.rs:156:18
95+
--> tests/ui/useless_vec.rs:156:18
9696
|
9797
LL | in_macro!(1, vec![1, 2], vec![1; 2]);
9898
| ^^^^^^^^^^ help: you can use an array directly: `[1, 2]`
9999

100100
error: useless use of `vec!`
101-
--> tests/ui/vec.rs:156:30
101+
--> tests/ui/useless_vec.rs:156:30
102102
|
103103
LL | in_macro!(1, vec![1, 2], vec![1; 2]);
104104
| ^^^^^^^^^^ help: you can use an array directly: `[1; 2]`
105105

106106
error: useless use of `vec!`
107-
--> tests/ui/vec.rs:177:14
107+
--> tests/ui/useless_vec.rs:177:14
108108
|
109109
LL | for a in vec![1, 2, 3] {
110110
| ^^^^^^^^^^^^^ help: you can use an array directly: `[1, 2, 3]`
111111

112112
error: useless use of `vec!`
113-
--> tests/ui/vec.rs:182:14
113+
--> tests/ui/useless_vec.rs:182:14
114114
|
115115
LL | for a in vec![String::new(), String::new()] {
116116
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[String::new(), String::new()]`
117117

118118
error: useless use of `vec!`
119-
--> tests/ui/vec.rs:215:33
119+
--> tests/ui/useless_vec.rs:215:33
120120
|
121121
LL | this_macro_doesnt_need_vec!(vec![1]);
122122
| ^^^^^^^ help: you can use an array directly: `[1]`
123123

124124
error: useless use of `vec!`
125-
--> tests/ui/vec.rs:242:14
125+
--> tests/ui/useless_vec.rs:242:14
126126
|
127127
LL | for a in &(vec![1, 2]) {}
128128
| ^^^^^^^^^^^^^ help: you can use a slice directly: `&[1, 2]`
129129

130130
error: useless use of `vec!`
131-
--> tests/ui/vec.rs:250:13
131+
--> tests/ui/useless_vec.rs:250:13
132132
|
133133
LL | let v = &vec![];
134134
| ^^^^^^^ help: you can use a slice directly: `&[]`

0 commit comments

Comments
 (0)