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

error: manual `Range::contains` implementation
  --> $DIR/range_contains.rs:14:5
   |
LL |     x < 42 && x >= 21;
   |     ^^^^^^^^^^^^^^^^^ help: use: `(21..42).contains(&x)`

error: manual `Range::contains` implementation
  --> $DIR/range_contains.rs:15:5
   |
LL |     100 > x && 1 <= x;
   |     ^^^^^^^^^^^^^^^^^ help: use: `(1..100).contains(&x)`

error: manual `RangeInclusive::contains` implementation
  --> $DIR/range_contains.rs:18:5
   |
LL |     x >= 9 && x <= 99;
   |     ^^^^^^^^^^^^^^^^^ help: use: `(9..=99).contains(&x)`

error: manual `RangeInclusive::contains` implementation
  --> $DIR/range_contains.rs:19:5
   |
LL |     x <= 33 && x >= 1;
   |     ^^^^^^^^^^^^^^^^^ help: use: `(1..=33).contains(&x)`

error: manual `RangeInclusive::contains` implementation
  --> $DIR/range_contains.rs:20:5
   |
LL |     999 >= x && 1 <= x;
   |     ^^^^^^^^^^^^^^^^^^ help: use: `(1..=999).contains(&x)`

error: manual `!Range::contains` implementation
  --> $DIR/range_contains.rs:23:5
   |
LL |     x < 8 || x >= 12;
   |     ^^^^^^^^^^^^^^^^ help: use: `!(8..12).contains(&x)`

error: manual `!Range::contains` implementation
  --> $DIR/range_contains.rs:24:5
   |
LL |     x >= 42 || x < 21;
   |     ^^^^^^^^^^^^^^^^^ help: use: `!(21..42).contains(&x)`

error: manual `!Range::contains` implementation
  --> $DIR/range_contains.rs:25:5
   |
LL |     100 <= x || 1 > x;
   |     ^^^^^^^^^^^^^^^^^ help: use: `!(1..100).contains(&x)`

error: manual `!RangeInclusive::contains` implementation
  --> $DIR/range_contains.rs:28:5
   |
LL |     x < 9 || x > 99;
   |     ^^^^^^^^^^^^^^^ help: use: `!(9..=99).contains(&x)`

error: manual `!RangeInclusive::contains` implementation
  --> $DIR/range_contains.rs:29:5
   |
LL |     x > 33 || x < 1;
   |     ^^^^^^^^^^^^^^^ help: use: `!(1..=33).contains(&x)`

error: manual `!RangeInclusive::contains` implementation
  --> $DIR/range_contains.rs:30:5
   |
LL |     999 < x || 1 > x;
   |     ^^^^^^^^^^^^^^^^ help: use: `!(1..=999).contains(&x)`

error: manual `Range::contains` implementation
  --> $DIR/range_contains.rs:45:5
   |
LL |     y >= 0. && y < 1.;
   |     ^^^^^^^^^^^^^^^^^ help: use: `(0. ..1.).contains(&y)`

error: manual `!RangeInclusive::contains` implementation
  --> $DIR/range_contains.rs:46:5
   |
LL |     y < 0. || y > 1.;
   |     ^^^^^^^^^^^^^^^^ help: use: `!(0. ..=1.).contains(&y)`

error: manual `RangeInclusive::contains` implementation
  --> $DIR/range_contains.rs:49:5
   |
LL |     x >= -10 && x <= 10;
   |     ^^^^^^^^^^^^^^^^^^^ help: use: `(-10..=10).contains(&x)`

error: manual `RangeInclusive::contains` implementation
  --> $DIR/range_contains.rs:51:5
   |
LL |     y >= -3. && y <= 3.;
   |     ^^^^^^^^^^^^^^^^^^^ help: use: `(-3. ..=3.).contains(&y)`

error: manual `RangeInclusive::contains` implementation
  --> $DIR/range_contains.rs:56:30
   |
LL |     (x >= 0) && (x <= 10) && (z >= 0) && (z <= 10);
   |                              ^^^^^^^^^^^^^^^^^^^^^ help: use: `(0..=10).contains(&z)`

error: manual `RangeInclusive::contains` implementation
  --> $DIR/range_contains.rs:56:5
   |
LL |     (x >= 0) && (x <= 10) && (z >= 0) && (z <= 10);
   |     ^^^^^^^^^^^^^^^^^^^^^ help: use: `(0..=10).contains(&x)`

error: manual `!Range::contains` implementation
  --> $DIR/range_contains.rs:57:29
   |
LL |     (x < 0) || (x >= 10) || (z < 0) || (z >= 10);
   |                             ^^^^^^^^^^^^^^^^^^^^ help: use: `!(0..10).contains(&z)`

error: manual `!Range::contains` implementation
  --> $DIR/range_contains.rs:57:5
   |
LL |     (x < 0) || (x >= 10) || (z < 0) || (z >= 10);
   |     ^^^^^^^^^^^^^^^^^^^^ help: use: `!(0..10).contains(&x)`

error: manual `Range::contains` implementation
  --> $DIR/range_contains.rs:76:5
   |
LL |     x >= 8 && x < 35;
   |     ^^^^^^^^^^^^^^^^ help: use: `(8..35).contains(&x)`

error: aborting due to 21 previous errors