File tree Expand file tree Collapse file tree 2 files changed +5
-21
lines changed Expand file tree Collapse file tree 2 files changed +5
-21
lines changed Original file line number Diff line number Diff line change @@ -158,7 +158,7 @@ impl IntPlusOne {
158
158
|db| {
159
159
db. span_suggestion (
160
160
block. span ,
161
- "change `>= y + 1` to `> y` as shown " ,
161
+ "change it to " ,
162
162
recommendation,
163
163
Applicability :: MachineApplicable , // snippet
164
164
) ;
Original file line number Diff line number Diff line change @@ -2,43 +2,27 @@ error: Unnecessary `>= y + 1` or `x - 1 >=`
2
2
--> $DIR/int_plus_one.rs:9:13
3
3
|
4
4
LL | let _ = x >= y + 1;
5
- | ^^^^^^^^^^
5
+ | ^^^^^^^^^^ help: change it to: `x > y`
6
6
|
7
7
= note: `-D clippy::int-plus-one` implied by `-D warnings`
8
- help: change `>= y + 1` to `> y` as shown
9
- |
10
- LL | let _ = x > y;
11
- | ^^^^^
12
8
13
9
error: Unnecessary `>= y + 1` or `x - 1 >=`
14
10
--> $DIR/int_plus_one.rs:10:13
15
11
|
16
12
LL | let _ = y + 1 <= x;
17
- | ^^^^^^^^^^
18
- help: change `>= y + 1` to `> y` as shown
19
- |
20
- LL | let _ = y < x;
21
- | ^^^^^
13
+ | ^^^^^^^^^^ help: change it to: `y < x`
22
14
23
15
error: Unnecessary `>= y + 1` or `x - 1 >=`
24
16
--> $DIR/int_plus_one.rs:12:13
25
17
|
26
18
LL | let _ = x - 1 >= y;
27
- | ^^^^^^^^^^
28
- help: change `>= y + 1` to `> y` as shown
29
- |
30
- LL | let _ = x > y;
31
- | ^^^^^
19
+ | ^^^^^^^^^^ help: change it to: `x > y`
32
20
33
21
error: Unnecessary `>= y + 1` or `x - 1 >=`
34
22
--> $DIR/int_plus_one.rs:13:13
35
23
|
36
24
LL | let _ = y <= x - 1;
37
- | ^^^^^^^^^^
38
- help: change `>= y + 1` to `> y` as shown
39
- |
40
- LL | let _ = y < x;
41
- | ^^^^^
25
+ | ^^^^^^^^^^ help: change it to: `y < x`
42
26
43
27
error: aborting due to 4 previous errors
44
28
You can’t perform that action at this time.
0 commit comments