Skip to content

Commit d29f6d2

Browse files
committed
Leave note on non-rustfixable tests
1 parent 329e224 commit d29f6d2

File tree

5 files changed

+46
-42
lines changed

5 files changed

+46
-42
lines changed

tests/ui/eq_op.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// does not test any rustfixable lints
2+
13
#[rustfmt::skip]
24
#[warn(clippy::eq_op)]
35
#[allow(clippy::identity_op, clippy::double_parens, clippy::many_single_char_names)]

tests/ui/eq_op.stderr

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,163 +1,163 @@
11
error: equal expressions as operands to `==`
2-
--> $DIR/eq_op.rs:9:5
2+
--> $DIR/eq_op.rs:11:5
33
|
44
LL | 1 == 1;
55
| ^^^^^^
66
|
77
= note: `-D clippy::eq-op` implied by `-D warnings`
88

99
error: equal expressions as operands to `==`
10-
--> $DIR/eq_op.rs:10:5
10+
--> $DIR/eq_op.rs:12:5
1111
|
1212
LL | "no" == "no";
1313
| ^^^^^^^^^^^^
1414

1515
error: equal expressions as operands to `!=`
16-
--> $DIR/eq_op.rs:12:5
16+
--> $DIR/eq_op.rs:14:5
1717
|
1818
LL | false != false;
1919
| ^^^^^^^^^^^^^^
2020

2121
error: equal expressions as operands to `<`
22-
--> $DIR/eq_op.rs:13:5
22+
--> $DIR/eq_op.rs:15:5
2323
|
2424
LL | 1.5 < 1.5;
2525
| ^^^^^^^^^
2626

2727
error: equal expressions as operands to `>=`
28-
--> $DIR/eq_op.rs:14:5
28+
--> $DIR/eq_op.rs:16:5
2929
|
3030
LL | 1u64 >= 1u64;
3131
| ^^^^^^^^^^^^
3232

3333
error: equal expressions as operands to `&`
34-
--> $DIR/eq_op.rs:17:5
34+
--> $DIR/eq_op.rs:19:5
3535
|
3636
LL | (1 as u64) & (1 as u64);
3737
| ^^^^^^^^^^^^^^^^^^^^^^^
3838

3939
error: equal expressions as operands to `^`
40-
--> $DIR/eq_op.rs:18:5
40+
--> $DIR/eq_op.rs:20:5
4141
|
4242
LL | 1 ^ ((((((1))))));
4343
| ^^^^^^^^^^^^^^^^^
4444

4545
error: equal expressions as operands to `<`
46-
--> $DIR/eq_op.rs:21:5
46+
--> $DIR/eq_op.rs:23:5
4747
|
4848
LL | (-(2) < -(2));
4949
| ^^^^^^^^^^^^^
5050

5151
error: equal expressions as operands to `==`
52-
--> $DIR/eq_op.rs:22:5
52+
--> $DIR/eq_op.rs:24:5
5353
|
5454
LL | ((1 + 1) & (1 + 1) == (1 + 1) & (1 + 1));
5555
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5656

5757
error: equal expressions as operands to `&`
58-
--> $DIR/eq_op.rs:22:6
58+
--> $DIR/eq_op.rs:24:6
5959
|
6060
LL | ((1 + 1) & (1 + 1) == (1 + 1) & (1 + 1));
6161
| ^^^^^^^^^^^^^^^^^
6262

6363
error: equal expressions as operands to `&`
64-
--> $DIR/eq_op.rs:22:27
64+
--> $DIR/eq_op.rs:24:27
6565
|
6666
LL | ((1 + 1) & (1 + 1) == (1 + 1) & (1 + 1));
6767
| ^^^^^^^^^^^^^^^^^
6868

6969
error: equal expressions as operands to `==`
70-
--> $DIR/eq_op.rs:23:5
70+
--> $DIR/eq_op.rs:25:5
7171
|
7272
LL | (1 * 2) + (3 * 4) == 1 * 2 + 3 * 4;
7373
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7474

7575
error: equal expressions as operands to `!=`
76-
--> $DIR/eq_op.rs:26:5
76+
--> $DIR/eq_op.rs:28:5
7777
|
7878
LL | ([1] != [1]);
7979
| ^^^^^^^^^^^^
8080

8181
error: equal expressions as operands to `!=`
82-
--> $DIR/eq_op.rs:27:5
82+
--> $DIR/eq_op.rs:29:5
8383
|
8484
LL | ((1, 2) != (1, 2));
8585
| ^^^^^^^^^^^^^^^^^^
8686

8787
error: equal expressions as operands to `==`
88-
--> $DIR/eq_op.rs:31:5
88+
--> $DIR/eq_op.rs:33:5
8989
|
9090
LL | 1 + 1 == 2;
9191
| ^^^^^^^^^^
9292

9393
error: equal expressions as operands to `==`
94-
--> $DIR/eq_op.rs:32:5
94+
--> $DIR/eq_op.rs:34:5
9595
|
9696
LL | 1 - 1 == 0;
9797
| ^^^^^^^^^^
9898

9999
error: equal expressions as operands to `-`
100-
--> $DIR/eq_op.rs:32:5
100+
--> $DIR/eq_op.rs:34:5
101101
|
102102
LL | 1 - 1 == 0;
103103
| ^^^^^
104104

105105
error: equal expressions as operands to `-`
106-
--> $DIR/eq_op.rs:34:5
106+
--> $DIR/eq_op.rs:36:5
107107
|
108108
LL | 1 - 1;
109109
| ^^^^^
110110

111111
error: equal expressions as operands to `/`
112-
--> $DIR/eq_op.rs:35:5
112+
--> $DIR/eq_op.rs:37:5
113113
|
114114
LL | 1 / 1;
115115
| ^^^^^
116116

117117
error: equal expressions as operands to `&&`
118-
--> $DIR/eq_op.rs:36:5
118+
--> $DIR/eq_op.rs:38:5
119119
|
120120
LL | true && true;
121121
| ^^^^^^^^^^^^
122122

123123
error: equal expressions as operands to `||`
124-
--> $DIR/eq_op.rs:38:5
124+
--> $DIR/eq_op.rs:40:5
125125
|
126126
LL | true || true;
127127
| ^^^^^^^^^^^^
128128

129129
error: equal expressions as operands to `&&`
130-
--> $DIR/eq_op.rs:44:5
130+
--> $DIR/eq_op.rs:46:5
131131
|
132132
LL | a == b && b == a;
133133
| ^^^^^^^^^^^^^^^^
134134

135135
error: equal expressions as operands to `&&`
136-
--> $DIR/eq_op.rs:45:5
136+
--> $DIR/eq_op.rs:47:5
137137
|
138138
LL | a != b && b != a;
139139
| ^^^^^^^^^^^^^^^^
140140

141141
error: equal expressions as operands to `&&`
142-
--> $DIR/eq_op.rs:46:5
142+
--> $DIR/eq_op.rs:48:5
143143
|
144144
LL | a < b && b > a;
145145
| ^^^^^^^^^^^^^^
146146

147147
error: equal expressions as operands to `&&`
148-
--> $DIR/eq_op.rs:47:5
148+
--> $DIR/eq_op.rs:49:5
149149
|
150150
LL | a <= b && b >= a;
151151
| ^^^^^^^^^^^^^^^^
152152

153153
error: equal expressions as operands to `==`
154-
--> $DIR/eq_op.rs:50:5
154+
--> $DIR/eq_op.rs:52:5
155155
|
156156
LL | a == a;
157157
| ^^^^^^
158158

159159
error: equal expressions as operands to `/`
160-
--> $DIR/eq_op.rs:60:20
160+
--> $DIR/eq_op.rs:62:20
161161
|
162162
LL | const D: u32 = A / A;
163163
| ^^^^^

tests/ui/float_cmp_const.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// does not test any rustfixable lints
2+
13
#![warn(clippy::float_cmp_const)]
24
#![allow(clippy::float_cmp)]
35
#![allow(unused, clippy::no_effect, clippy::unnecessary_operation)]

tests/ui/float_cmp_const.stderr

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,84 @@
11
error: strict comparison of f32 or f64 constant
2-
--> $DIR/float_cmp_const.rs:18:5
2+
--> $DIR/float_cmp_const.rs:20:5
33
|
44
LL | 1f32 == ONE;
55
| ^^^^^^^^^^^ help: consider comparing them within some error: `(1f32 - ONE).abs() < error`
66
|
77
= note: `-D clippy::float-cmp-const` implied by `-D warnings`
88
note: std::f32::EPSILON and std::f64::EPSILON are available.
9-
--> $DIR/float_cmp_const.rs:18:5
9+
--> $DIR/float_cmp_const.rs:20:5
1010
|
1111
LL | 1f32 == ONE;
1212
| ^^^^^^^^^^^
1313

1414
error: strict comparison of f32 or f64 constant
15-
--> $DIR/float_cmp_const.rs:19:5
15+
--> $DIR/float_cmp_const.rs:21:5
1616
|
1717
LL | TWO == ONE;
1818
| ^^^^^^^^^^ help: consider comparing them within some error: `(TWO - ONE).abs() < error`
1919
|
2020
note: std::f32::EPSILON and std::f64::EPSILON are available.
21-
--> $DIR/float_cmp_const.rs:19:5
21+
--> $DIR/float_cmp_const.rs:21:5
2222
|
2323
LL | TWO == ONE;
2424
| ^^^^^^^^^^
2525

2626
error: strict comparison of f32 or f64 constant
27-
--> $DIR/float_cmp_const.rs:20:5
27+
--> $DIR/float_cmp_const.rs:22:5
2828
|
2929
LL | TWO != ONE;
3030
| ^^^^^^^^^^ help: consider comparing them within some error: `(TWO - ONE).abs() > error`
3131
|
3232
note: std::f32::EPSILON and std::f64::EPSILON are available.
33-
--> $DIR/float_cmp_const.rs:20:5
33+
--> $DIR/float_cmp_const.rs:22:5
3434
|
3535
LL | TWO != ONE;
3636
| ^^^^^^^^^^
3737

3838
error: strict comparison of f32 or f64 constant
39-
--> $DIR/float_cmp_const.rs:21:5
39+
--> $DIR/float_cmp_const.rs:23:5
4040
|
4141
LL | ONE + ONE == TWO;
4242
| ^^^^^^^^^^^^^^^^ help: consider comparing them within some error: `(ONE + ONE - TWO).abs() < error`
4343
|
4444
note: std::f32::EPSILON and std::f64::EPSILON are available.
45-
--> $DIR/float_cmp_const.rs:21:5
45+
--> $DIR/float_cmp_const.rs:23:5
4646
|
4747
LL | ONE + ONE == TWO;
4848
| ^^^^^^^^^^^^^^^^
4949

5050
error: strict comparison of f32 or f64 constant
51-
--> $DIR/float_cmp_const.rs:23:5
51+
--> $DIR/float_cmp_const.rs:25:5
5252
|
5353
LL | x as f32 == ONE;
5454
| ^^^^^^^^^^^^^^^ help: consider comparing them within some error: `(x as f32 - ONE).abs() < error`
5555
|
5656
note: std::f32::EPSILON and std::f64::EPSILON are available.
57-
--> $DIR/float_cmp_const.rs:23:5
57+
--> $DIR/float_cmp_const.rs:25:5
5858
|
5959
LL | x as f32 == ONE;
6060
| ^^^^^^^^^^^^^^^
6161

6262
error: strict comparison of f32 or f64 constant
63-
--> $DIR/float_cmp_const.rs:26:5
63+
--> $DIR/float_cmp_const.rs:28:5
6464
|
6565
LL | v == ONE;
6666
| ^^^^^^^^ help: consider comparing them within some error: `(v - ONE).abs() < error`
6767
|
6868
note: std::f32::EPSILON and std::f64::EPSILON are available.
69-
--> $DIR/float_cmp_const.rs:26:5
69+
--> $DIR/float_cmp_const.rs:28:5
7070
|
7171
LL | v == ONE;
7272
| ^^^^^^^^
7373

7474
error: strict comparison of f32 or f64 constant
75-
--> $DIR/float_cmp_const.rs:27:5
75+
--> $DIR/float_cmp_const.rs:29:5
7676
|
7777
LL | v != ONE;
7878
| ^^^^^^^^ help: consider comparing them within some error: `(v - ONE).abs() > error`
7979
|
8080
note: std::f32::EPSILON and std::f64::EPSILON are available.
81-
--> $DIR/float_cmp_const.rs:27:5
81+
--> $DIR/float_cmp_const.rs:29:5
8282
|
8383
LL | v != ONE;
8484
| ^^^^^^^^

tests/ui/literals.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// tests no rustfixable lints
1+
// does not test any rustfixable lints
22

33
#![warn(clippy::mixed_case_hex_literals)]
44
#![warn(clippy::zero_prefixed_literal)]

0 commit comments

Comments
 (0)