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