Skip to content

Commit f51b2ed

Browse files
committed
Replace allow with expect for lints that fire, remove those that don't
1 parent 82e195f commit f51b2ed

1,158 files changed

Lines changed: 5358 additions & 6576 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

tests/ui/absurd-extreme-comparisons.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
#![warn(clippy::absurd_extreme_comparisons)]
2-
#![allow(
3-
unused,
4-
clippy::eq_op,
5-
clippy::no_effect,
6-
clippy::unnecessary_operation,
7-
clippy::needless_pass_by_value
8-
)]
2+
#![expect(clippy::no_effect)]
3+
#![expect(clippy::eq_op)]
94

105
#[rustfmt::skip]
116
fn main() {

tests/ui/absurd-extreme-comparisons.stderr

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
2-
--> tests/ui/absurd-extreme-comparisons.rs:14:5
2+
--> tests/ui/absurd-extreme-comparisons.rs:9:5
33
|
44
LL | u <= 0;
55
| ^^^^^^
@@ -9,135 +9,135 @@ LL | u <= 0;
99
= help: to override `-D warnings` add `#[allow(clippy::absurd_extreme_comparisons)]`
1010

1111
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
12-
--> tests/ui/absurd-extreme-comparisons.rs:17:5
12+
--> tests/ui/absurd-extreme-comparisons.rs:12:5
1313
|
1414
LL | u <= Z;
1515
| ^^^^^^
1616
|
1717
= help: because `Z` is the minimum value for this type, the case where the two sides are not equal never occurs, consider using `u == Z` instead
1818

1919
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
20-
--> tests/ui/absurd-extreme-comparisons.rs:20:5
20+
--> tests/ui/absurd-extreme-comparisons.rs:15:5
2121
|
2222
LL | u < Z;
2323
| ^^^^^
2424
|
2525
= help: because `Z` is the minimum value for this type, this comparison is always false
2626

2727
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
28-
--> tests/ui/absurd-extreme-comparisons.rs:23:5
28+
--> tests/ui/absurd-extreme-comparisons.rs:18:5
2929
|
3030
LL | Z >= u;
3131
| ^^^^^^
3232
|
3333
= help: because `Z` is the minimum value for this type, the case where the two sides are not equal never occurs, consider using `Z == u` instead
3434

3535
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
36-
--> tests/ui/absurd-extreme-comparisons.rs:26:5
36+
--> tests/ui/absurd-extreme-comparisons.rs:21:5
3737
|
3838
LL | Z > u;
3939
| ^^^^^
4040
|
4141
= help: because `Z` is the minimum value for this type, this comparison is always false
4242

4343
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
44-
--> tests/ui/absurd-extreme-comparisons.rs:29:5
44+
--> tests/ui/absurd-extreme-comparisons.rs:24:5
4545
|
4646
LL | u > u32::MAX;
4747
| ^^^^^^^^^^^^
4848
|
4949
= help: because `u32::MAX` is the maximum value for this type, this comparison is always false
5050

5151
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
52-
--> tests/ui/absurd-extreme-comparisons.rs:32:5
52+
--> tests/ui/absurd-extreme-comparisons.rs:27:5
5353
|
5454
LL | u >= u32::MAX;
5555
| ^^^^^^^^^^^^^
5656
|
5757
= help: because `u32::MAX` is the maximum value for this type, the case where the two sides are not equal never occurs, consider using `u == u32::MAX` instead
5858

5959
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
60-
--> tests/ui/absurd-extreme-comparisons.rs:35:5
60+
--> tests/ui/absurd-extreme-comparisons.rs:30:5
6161
|
6262
LL | u32::MAX < u;
6363
| ^^^^^^^^^^^^
6464
|
6565
= help: because `u32::MAX` is the maximum value for this type, this comparison is always false
6666

6767
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
68-
--> tests/ui/absurd-extreme-comparisons.rs:38:5
68+
--> tests/ui/absurd-extreme-comparisons.rs:33:5
6969
|
7070
LL | u32::MAX <= u;
7171
| ^^^^^^^^^^^^^
7272
|
7373
= help: because `u32::MAX` is the maximum value for this type, the case where the two sides are not equal never occurs, consider using `u32::MAX == u` instead
7474

7575
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
76-
--> tests/ui/absurd-extreme-comparisons.rs:41:5
76+
--> tests/ui/absurd-extreme-comparisons.rs:36:5
7777
|
7878
LL | 1-1 > u;
7979
| ^^^^^^^
8080
|
8181
= help: because `1-1` is the minimum value for this type, this comparison is always false
8282

8383
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
84-
--> tests/ui/absurd-extreme-comparisons.rs:44:5
84+
--> tests/ui/absurd-extreme-comparisons.rs:39:5
8585
|
8686
LL | u >= !0;
8787
| ^^^^^^^
8888
|
8989
= help: because `!0` is the maximum value for this type, the case where the two sides are not equal never occurs, consider using `u == !0` instead
9090

9191
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
92-
--> tests/ui/absurd-extreme-comparisons.rs:47:5
92+
--> tests/ui/absurd-extreme-comparisons.rs:42:5
9393
|
9494
LL | u <= 12 - 2*6;
9595
| ^^^^^^^^^^^^^
9696
|
9797
= help: because `12 - 2*6` is the minimum value for this type, the case where the two sides are not equal never occurs, consider using `u == 12 - 2*6` instead
9898

9999
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
100-
--> tests/ui/absurd-extreme-comparisons.rs:51:5
100+
--> tests/ui/absurd-extreme-comparisons.rs:46:5
101101
|
102102
LL | i < -127 - 1;
103103
| ^^^^^^^^^^^^
104104
|
105105
= help: because `-127 - 1` is the minimum value for this type, this comparison is always false
106106

107107
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
108-
--> tests/ui/absurd-extreme-comparisons.rs:54:5
108+
--> tests/ui/absurd-extreme-comparisons.rs:49:5
109109
|
110110
LL | i8::MAX >= i;
111111
| ^^^^^^^^^^^^
112112
|
113113
= help: because `i8::MAX` is the maximum value for this type, this comparison is always true
114114

115115
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
116-
--> tests/ui/absurd-extreme-comparisons.rs:57:5
116+
--> tests/ui/absurd-extreme-comparisons.rs:52:5
117117
|
118118
LL | 3-7 < i32::MIN;
119119
| ^^^^^^^^^^^^^^
120120
|
121121
= help: because `i32::MIN` is the minimum value for this type, this comparison is always false
122122

123123
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
124-
--> tests/ui/absurd-extreme-comparisons.rs:61:5
124+
--> tests/ui/absurd-extreme-comparisons.rs:56:5
125125
|
126126
LL | b >= true;
127127
| ^^^^^^^^^
128128
|
129129
= help: because `true` is the maximum value for this type, the case where the two sides are not equal never occurs, consider using `b == true` instead
130130

131131
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
132-
--> tests/ui/absurd-extreme-comparisons.rs:64:5
132+
--> tests/ui/absurd-extreme-comparisons.rs:59:5
133133
|
134134
LL | false > b;
135135
| ^^^^^^^^^
136136
|
137137
= help: because `false` is the minimum value for this type, this comparison is always false
138138

139139
error: <-comparison of unit values detected. This will always be false
140-
--> tests/ui/absurd-extreme-comparisons.rs:69:5
140+
--> tests/ui/absurd-extreme-comparisons.rs:64:5
141141
|
142142
LL | () < {};
143143
| ^^^^^^^

tests/ui/almost_complete_range.fixed

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#![feature(stmt_expr_attributes)]
55
#![warn(clippy::almost_complete_range)]
66
#![allow(ellipsis_inclusive_range_patterns)]
7-
#![allow(clippy::needless_parens_on_range_literals)]
7+
#![expect(clippy::needless_parens_on_range_literals)]
88
#![allow(clippy::double_parens)]
99

1010
extern crate proc_macros;

tests/ui/almost_complete_range.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#![feature(stmt_expr_attributes)]
55
#![warn(clippy::almost_complete_range)]
66
#![allow(ellipsis_inclusive_range_patterns)]
7-
#![allow(clippy::needless_parens_on_range_literals)]
7+
#![expect(clippy::needless_parens_on_range_literals)]
88
#![allow(clippy::double_parens)]
99

1010
extern crate proc_macros;

tests/ui/arithmetic_side_effects.rs

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,12 @@
22

33
#![feature(f128)]
44
#![feature(f16)]
5-
#![allow(
6-
clippy::assign_op_pattern,
7-
clippy::erasing_op,
8-
clippy::identity_op,
9-
clippy::no_effect,
10-
clippy::op_ref,
11-
clippy::unnecessary_owned_empty_strings,
12-
arithmetic_overflow,
13-
unconditional_panic
14-
)]
5+
#![expect(clippy::unnecessary_owned_empty_strings)]
6+
#![expect(clippy::op_ref)]
7+
#![expect(clippy::no_effect)]
8+
#![expect(clippy::identity_op)]
9+
#![expect(clippy::erasing_op)]
10+
#![expect(clippy::assign_op_pattern)]
1511
#![warn(clippy::arithmetic_side_effects)]
1612

1713
extern crate proc_macro_derive;

0 commit comments

Comments
 (0)