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 {
158158 |db| {
159159 db. span_suggestion (
160160 block. span ,
161- "change `>= y + 1` to `> y` as shown " ,
161+ "change it to " ,
162162 recommendation,
163163 Applicability :: MachineApplicable , // snippet
164164 ) ;
Original file line number Diff line number Diff line change @@ -2,43 +2,27 @@ error: Unnecessary `>= y + 1` or `x - 1 >=`
22 --> $DIR/int_plus_one.rs:9:13
33 |
44LL | let _ = x >= y + 1;
5- | ^^^^^^^^^^
5+ | ^^^^^^^^^^ help: change it to: `x > y`
66 |
77 = 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- | ^^^^^
128
139error: Unnecessary `>= y + 1` or `x - 1 >=`
1410 --> $DIR/int_plus_one.rs:10:13
1511 |
1612LL | 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`
2214
2315error: Unnecessary `>= y + 1` or `x - 1 >=`
2416 --> $DIR/int_plus_one.rs:12:13
2517 |
2618LL | 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`
3220
3321error: Unnecessary `>= y + 1` or `x - 1 >=`
3422 --> $DIR/int_plus_one.rs:13:13
3523 |
3624LL | 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`
4226
4327error: aborting due to 4 previous errors
4428
You can’t perform that action at this time.
0 commit comments