Skip to content

Commit 6c89c00

Browse files
Further clean up tests/ui/rename.rs
Now it is just a collection of lints + an empty main function
1 parent d0c04b4 commit 6c89c00

File tree

3 files changed

+50
-58
lines changed

3 files changed

+50
-58
lines changed

tests/ui/rename.fixed

+3-7
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@
3030
#![allow(invalid_atomic_ordering)]
3131
#![allow(enum_intrinsics_non_enums)]
3232
// warn for the old lint name here, to test if the renaming worked
33+
#![warn(clippy::module_name_repetitions)]
34+
#![warn(clippy::new_without_default)]
35+
#![warn(clippy::redundant_static_lifetimes)]
3336
#![warn(clippy::cognitive_complexity)]
3437
#![warn(enum_intrinsics_non_enums)]
3538
#![warn(clippy::bind_instead_of_map)]
@@ -58,11 +61,4 @@
5861
#![warn(invalid_atomic_ordering)]
5962
#![warn(enum_intrinsics_non_enums)]
6063

61-
#[warn(clippy::module_name_repetitions)]
6264
fn main() {}
63-
64-
#[warn(clippy::new_without_default)]
65-
struct Foo;
66-
67-
#[warn(clippy::redundant_static_lifetimes)]
68-
fn foo() {}

tests/ui/rename.rs

+3-7
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@
3030
#![allow(invalid_atomic_ordering)]
3131
#![allow(enum_intrinsics_non_enums)]
3232
// warn for the old lint name here, to test if the renaming worked
33+
#![warn(clippy::stutter)]
34+
#![warn(clippy::new_without_default_derive)]
35+
#![warn(clippy::const_static_lifetime)]
3336
#![warn(clippy::cyclomatic_complexity)]
3437
#![warn(clippy::mem_discriminant_non_enum)]
3538
#![warn(clippy::option_and_then_some)]
@@ -58,11 +61,4 @@
5861
#![warn(clippy::invalid_atomic_ordering)]
5962
#![warn(clippy::mem_discriminant_non_enum)]
6063

61-
#[warn(clippy::stutter)]
6264
fn main() {}
63-
64-
#[warn(clippy::new_without_default_derive)]
65-
struct Foo;
66-
67-
#[warn(clippy::const_static_lifetime)]
68-
fn foo() {}

tests/ui/rename.stderr

+44-44
Original file line numberDiff line numberDiff line change
@@ -20,179 +20,179 @@ LL | #![allow(clippy::for_loop_over_fallibles)]
2020
|
2121
= note: `-D unknown-lints` implied by `-D warnings`
2222

23-
error: lint `clippy::cyclomatic_complexity` has been renamed to `clippy::cognitive_complexity`
23+
error: lint `clippy::stutter` has been renamed to `clippy::module_name_repetitions`
2424
--> $DIR/rename.rs:33:9
2525
|
26+
LL | #![warn(clippy::stutter)]
27+
| ^^^^^^^^^^^^^^^ help: use the new name: `clippy::module_name_repetitions`
28+
29+
error: lint `clippy::new_without_default_derive` has been renamed to `clippy::new_without_default`
30+
--> $DIR/rename.rs:34:9
31+
|
32+
LL | #![warn(clippy::new_without_default_derive)]
33+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::new_without_default`
34+
35+
error: lint `clippy::const_static_lifetime` has been renamed to `clippy::redundant_static_lifetimes`
36+
--> $DIR/rename.rs:35:9
37+
|
38+
LL | #![warn(clippy::const_static_lifetime)]
39+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::redundant_static_lifetimes`
40+
41+
error: lint `clippy::cyclomatic_complexity` has been renamed to `clippy::cognitive_complexity`
42+
--> $DIR/rename.rs:36:9
43+
|
2644
LL | #![warn(clippy::cyclomatic_complexity)]
2745
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::cognitive_complexity`
2846

2947
error: lint `clippy::mem_discriminant_non_enum` has been renamed to `enum_intrinsics_non_enums`
30-
--> $DIR/rename.rs:34:9
48+
--> $DIR/rename.rs:37:9
3149
|
3250
LL | #![warn(clippy::mem_discriminant_non_enum)]
3351
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `enum_intrinsics_non_enums`
3452

3553
error: lint `clippy::option_and_then_some` has been renamed to `clippy::bind_instead_of_map`
36-
--> $DIR/rename.rs:35:9
54+
--> $DIR/rename.rs:38:9
3755
|
3856
LL | #![warn(clippy::option_and_then_some)]
3957
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::bind_instead_of_map`
4058

4159
error: lint `clippy::box_vec` has been renamed to `clippy::box_collection`
42-
--> $DIR/rename.rs:36:9
60+
--> $DIR/rename.rs:39:9
4361
|
4462
LL | #![warn(clippy::box_vec)]
4563
| ^^^^^^^^^^^^^^^ help: use the new name: `clippy::box_collection`
4664

4765
error: lint `clippy::option_map_unwrap_or` has been renamed to `clippy::map_unwrap_or`
48-
--> $DIR/rename.rs:37:9
66+
--> $DIR/rename.rs:40:9
4967
|
5068
LL | #![warn(clippy::option_map_unwrap_or)]
5169
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::map_unwrap_or`
5270

5371
error: lint `clippy::option_map_unwrap_or_else` has been renamed to `clippy::map_unwrap_or`
54-
--> $DIR/rename.rs:38:9
72+
--> $DIR/rename.rs:41:9
5573
|
5674
LL | #![warn(clippy::option_map_unwrap_or_else)]
5775
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::map_unwrap_or`
5876

5977
error: lint `clippy::result_map_unwrap_or_else` has been renamed to `clippy::map_unwrap_or`
60-
--> $DIR/rename.rs:39:9
78+
--> $DIR/rename.rs:42:9
6179
|
6280
LL | #![warn(clippy::result_map_unwrap_or_else)]
6381
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::map_unwrap_or`
6482

6583
error: lint `clippy::option_unwrap_used` has been renamed to `clippy::unwrap_used`
66-
--> $DIR/rename.rs:40:9
84+
--> $DIR/rename.rs:43:9
6785
|
6886
LL | #![warn(clippy::option_unwrap_used)]
6987
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::unwrap_used`
7088

7189
error: lint `clippy::result_unwrap_used` has been renamed to `clippy::unwrap_used`
72-
--> $DIR/rename.rs:41:9
90+
--> $DIR/rename.rs:44:9
7391
|
7492
LL | #![warn(clippy::result_unwrap_used)]
7593
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::unwrap_used`
7694

7795
error: lint `clippy::option_expect_used` has been renamed to `clippy::expect_used`
78-
--> $DIR/rename.rs:42:9
96+
--> $DIR/rename.rs:45:9
7997
|
8098
LL | #![warn(clippy::option_expect_used)]
8199
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::expect_used`
82100

83101
error: lint `clippy::result_expect_used` has been renamed to `clippy::expect_used`
84-
--> $DIR/rename.rs:43:9
102+
--> $DIR/rename.rs:46:9
85103
|
86104
LL | #![warn(clippy::result_expect_used)]
87105
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::expect_used`
88106

89107
error: lint `clippy::for_loop_over_option` has been renamed to `clippy::for_loops_over_fallibles`
90-
--> $DIR/rename.rs:44:9
108+
--> $DIR/rename.rs:47:9
91109
|
92110
LL | #![warn(clippy::for_loop_over_option)]
93111
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::for_loops_over_fallibles`
94112

95113
error: lint `clippy::for_loop_over_result` has been renamed to `clippy::for_loops_over_fallibles`
96-
--> $DIR/rename.rs:45:9
114+
--> $DIR/rename.rs:48:9
97115
|
98116
LL | #![warn(clippy::for_loop_over_result)]
99117
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::for_loops_over_fallibles`
100118

101119
error: lint `clippy::identity_conversion` has been renamed to `clippy::useless_conversion`
102-
--> $DIR/rename.rs:46:9
120+
--> $DIR/rename.rs:49:9
103121
|
104122
LL | #![warn(clippy::identity_conversion)]
105123
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::useless_conversion`
106124

107125
error: lint `clippy::zero_width_space` has been renamed to `clippy::invisible_characters`
108-
--> $DIR/rename.rs:47:9
126+
--> $DIR/rename.rs:50:9
109127
|
110128
LL | #![warn(clippy::zero_width_space)]
111129
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::invisible_characters`
112130

113131
error: lint `clippy::single_char_push_str` has been renamed to `clippy::single_char_add_str`
114-
--> $DIR/rename.rs:48:9
132+
--> $DIR/rename.rs:51:9
115133
|
116134
LL | #![warn(clippy::single_char_push_str)]
117135
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::single_char_add_str`
118136

119137
error: lint `clippy::if_let_some_result` has been renamed to `clippy::match_result_ok`
120-
--> $DIR/rename.rs:49:9
138+
--> $DIR/rename.rs:52:9
121139
|
122140
LL | #![warn(clippy::if_let_some_result)]
123141
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::match_result_ok`
124142

125143
error: lint `clippy::invalid_ref` has been renamed to `invalid_value`
126-
--> $DIR/rename.rs:51:9
144+
--> $DIR/rename.rs:54:9
127145
|
128146
LL | #![warn(clippy::invalid_ref)]
129147
| ^^^^^^^^^^^^^^^^^^^ help: use the new name: `invalid_value`
130148

131149
error: lint `clippy::into_iter_on_array` has been renamed to `array_into_iter`
132-
--> $DIR/rename.rs:52:9
150+
--> $DIR/rename.rs:55:9
133151
|
134152
LL | #![warn(clippy::into_iter_on_array)]
135153
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `array_into_iter`
136154

137155
error: lint `clippy::unused_label` has been renamed to `unused_labels`
138-
--> $DIR/rename.rs:53:9
156+
--> $DIR/rename.rs:56:9
139157
|
140158
LL | #![warn(clippy::unused_label)]
141159
| ^^^^^^^^^^^^^^^^^^^^ help: use the new name: `unused_labels`
142160

143161
error: lint `clippy::drop_bounds` has been renamed to `drop_bounds`
144-
--> $DIR/rename.rs:54:9
162+
--> $DIR/rename.rs:57:9
145163
|
146164
LL | #![warn(clippy::drop_bounds)]
147165
| ^^^^^^^^^^^^^^^^^^^ help: use the new name: `drop_bounds`
148166

149167
error: lint `clippy::temporary_cstring_as_ptr` has been renamed to `temporary_cstring_as_ptr`
150-
--> $DIR/rename.rs:55:9
168+
--> $DIR/rename.rs:58:9
151169
|
152170
LL | #![warn(clippy::temporary_cstring_as_ptr)]
153171
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `temporary_cstring_as_ptr`
154172

155173
error: lint `clippy::panic_params` has been renamed to `non_fmt_panics`
156-
--> $DIR/rename.rs:56:9
174+
--> $DIR/rename.rs:59:9
157175
|
158176
LL | #![warn(clippy::panic_params)]
159177
| ^^^^^^^^^^^^^^^^^^^^ help: use the new name: `non_fmt_panics`
160178

161179
error: lint `clippy::unknown_clippy_lints` has been renamed to `unknown_lints`
162-
--> $DIR/rename.rs:57:9
180+
--> $DIR/rename.rs:60:9
163181
|
164182
LL | #![warn(clippy::unknown_clippy_lints)]
165183
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `unknown_lints`
166184

167185
error: lint `clippy::invalid_atomic_ordering` has been renamed to `invalid_atomic_ordering`
168-
--> $DIR/rename.rs:58:9
186+
--> $DIR/rename.rs:61:9
169187
|
170188
LL | #![warn(clippy::invalid_atomic_ordering)]
171189
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `invalid_atomic_ordering`
172190

173191
error: lint `clippy::mem_discriminant_non_enum` has been renamed to `enum_intrinsics_non_enums`
174-
--> $DIR/rename.rs:59:9
192+
--> $DIR/rename.rs:62:9
175193
|
176194
LL | #![warn(clippy::mem_discriminant_non_enum)]
177195
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `enum_intrinsics_non_enums`
178196

179-
error: lint `clippy::stutter` has been renamed to `clippy::module_name_repetitions`
180-
--> $DIR/rename.rs:61:8
181-
|
182-
LL | #[warn(clippy::stutter)]
183-
| ^^^^^^^^^^^^^^^ help: use the new name: `clippy::module_name_repetitions`
184-
185-
error: lint `clippy::new_without_default_derive` has been renamed to `clippy::new_without_default`
186-
--> $DIR/rename.rs:64:8
187-
|
188-
LL | #[warn(clippy::new_without_default_derive)]
189-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::new_without_default`
190-
191-
error: lint `clippy::const_static_lifetime` has been renamed to `clippy::redundant_static_lifetimes`
192-
--> $DIR/rename.rs:67:8
193-
|
194-
LL | #[warn(clippy::const_static_lifetime)]
195-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::redundant_static_lifetimes`
196-
197197
error: aborting due to 32 previous errors
198198

0 commit comments

Comments
 (0)