]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/range_contains.stderr
Rollup merge of #102764 - compiler-errors:issue-102762, r=jackh726
[rust.git] / src / tools / clippy / tests / ui / range_contains.stderr
1 error: manual `Range::contains` implementation
2   --> $DIR/range_contains.rs:12:5
3    |
4 LL |     x >= 8 && x < 12;
5    |     ^^^^^^^^^^^^^^^^ help: use: `(8..12).contains(&x)`
6    |
7    = note: `-D clippy::manual-range-contains` implied by `-D warnings`
8
9 error: manual `Range::contains` implementation
10   --> $DIR/range_contains.rs:13:5
11    |
12 LL |     x < 42 && x >= 21;
13    |     ^^^^^^^^^^^^^^^^^ help: use: `(21..42).contains(&x)`
14
15 error: manual `Range::contains` implementation
16   --> $DIR/range_contains.rs:14:5
17    |
18 LL |     100 > x && 1 <= x;
19    |     ^^^^^^^^^^^^^^^^^ help: use: `(1..100).contains(&x)`
20
21 error: manual `RangeInclusive::contains` implementation
22   --> $DIR/range_contains.rs:17:5
23    |
24 LL |     x >= 9 && x <= 99;
25    |     ^^^^^^^^^^^^^^^^^ help: use: `(9..=99).contains(&x)`
26
27 error: manual `RangeInclusive::contains` implementation
28   --> $DIR/range_contains.rs:18:5
29    |
30 LL |     x <= 33 && x >= 1;
31    |     ^^^^^^^^^^^^^^^^^ help: use: `(1..=33).contains(&x)`
32
33 error: manual `RangeInclusive::contains` implementation
34   --> $DIR/range_contains.rs:19:5
35    |
36 LL |     999 >= x && 1 <= x;
37    |     ^^^^^^^^^^^^^^^^^^ help: use: `(1..=999).contains(&x)`
38
39 error: manual `!Range::contains` implementation
40   --> $DIR/range_contains.rs:22:5
41    |
42 LL |     x < 8 || x >= 12;
43    |     ^^^^^^^^^^^^^^^^ help: use: `!(8..12).contains(&x)`
44
45 error: manual `!Range::contains` implementation
46   --> $DIR/range_contains.rs:23:5
47    |
48 LL |     x >= 42 || x < 21;
49    |     ^^^^^^^^^^^^^^^^^ help: use: `!(21..42).contains(&x)`
50
51 error: manual `!Range::contains` implementation
52   --> $DIR/range_contains.rs:24:5
53    |
54 LL |     100 <= x || 1 > x;
55    |     ^^^^^^^^^^^^^^^^^ help: use: `!(1..100).contains(&x)`
56
57 error: manual `!RangeInclusive::contains` implementation
58   --> $DIR/range_contains.rs:27:5
59    |
60 LL |     x < 9 || x > 99;
61    |     ^^^^^^^^^^^^^^^ help: use: `!(9..=99).contains(&x)`
62
63 error: manual `!RangeInclusive::contains` implementation
64   --> $DIR/range_contains.rs:28:5
65    |
66 LL |     x > 33 || x < 1;
67    |     ^^^^^^^^^^^^^^^ help: use: `!(1..=33).contains(&x)`
68
69 error: manual `!RangeInclusive::contains` implementation
70   --> $DIR/range_contains.rs:29:5
71    |
72 LL |     999 < x || 1 > x;
73    |     ^^^^^^^^^^^^^^^^ help: use: `!(1..=999).contains(&x)`
74
75 error: manual `Range::contains` implementation
76   --> $DIR/range_contains.rs:44:5
77    |
78 LL |     y >= 0. && y < 1.;
79    |     ^^^^^^^^^^^^^^^^^ help: use: `(0. ..1.).contains(&y)`
80
81 error: manual `!RangeInclusive::contains` implementation
82   --> $DIR/range_contains.rs:45:5
83    |
84 LL |     y < 0. || y > 1.;
85    |     ^^^^^^^^^^^^^^^^ help: use: `!(0. ..=1.).contains(&y)`
86
87 error: manual `RangeInclusive::contains` implementation
88   --> $DIR/range_contains.rs:48:5
89    |
90 LL |     x >= -10 && x <= 10;
91    |     ^^^^^^^^^^^^^^^^^^^ help: use: `(-10..=10).contains(&x)`
92
93 error: manual `RangeInclusive::contains` implementation
94   --> $DIR/range_contains.rs:50:5
95    |
96 LL |     y >= -3. && y <= 3.;
97    |     ^^^^^^^^^^^^^^^^^^^ help: use: `(-3. ..=3.).contains(&y)`
98
99 error: manual `RangeInclusive::contains` implementation
100   --> $DIR/range_contains.rs:55:30
101    |
102 LL |     (x >= 0) && (x <= 10) && (z >= 0) && (z <= 10);
103    |                              ^^^^^^^^^^^^^^^^^^^^^ help: use: `(0..=10).contains(&z)`
104
105 error: manual `RangeInclusive::contains` implementation
106   --> $DIR/range_contains.rs:55:5
107    |
108 LL |     (x >= 0) && (x <= 10) && (z >= 0) && (z <= 10);
109    |     ^^^^^^^^^^^^^^^^^^^^^ help: use: `(0..=10).contains(&x)`
110
111 error: manual `!Range::contains` implementation
112   --> $DIR/range_contains.rs:56:29
113    |
114 LL |     (x < 0) || (x >= 10) || (z < 0) || (z >= 10);
115    |                             ^^^^^^^^^^^^^^^^^^^^ help: use: `!(0..10).contains(&z)`
116
117 error: manual `!Range::contains` implementation
118   --> $DIR/range_contains.rs:56:5
119    |
120 LL |     (x < 0) || (x >= 10) || (z < 0) || (z >= 10);
121    |     ^^^^^^^^^^^^^^^^^^^^ help: use: `!(0..10).contains(&x)`
122
123 error: aborting due to 20 previous errors
124