1error: because of the numeric bounds on `u8` prior to casting, this expression is always false
2  --> $DIR/invalid_upcast_comparisons.rs:21:5
3   |
4LL |     (u8 as u32) > 300;
5   |     ^^^^^^^^^^^^^^^^^
6   |
7   = note: `-D clippy::invalid-upcast-comparisons` implied by `-D warnings`
8
9error: because of the numeric bounds on `u8` prior to casting, this expression is always false
10  --> $DIR/invalid_upcast_comparisons.rs:22:5
11   |
12LL |     (u8 as i32) > 300;
13   |     ^^^^^^^^^^^^^^^^^
14
15error: because of the numeric bounds on `u8` prior to casting, this expression is always false
16  --> $DIR/invalid_upcast_comparisons.rs:23:5
17   |
18LL |     (u8 as u32) == 300;
19   |     ^^^^^^^^^^^^^^^^^^
20
21error: because of the numeric bounds on `u8` prior to casting, this expression is always false
22  --> $DIR/invalid_upcast_comparisons.rs:24:5
23   |
24LL |     (u8 as i32) == 300;
25   |     ^^^^^^^^^^^^^^^^^^
26
27error: because of the numeric bounds on `u8` prior to casting, this expression is always false
28  --> $DIR/invalid_upcast_comparisons.rs:25:5
29   |
30LL |     300 < (u8 as u32);
31   |     ^^^^^^^^^^^^^^^^^
32
33error: because of the numeric bounds on `u8` prior to casting, this expression is always false
34  --> $DIR/invalid_upcast_comparisons.rs:26:5
35   |
36LL |     300 < (u8 as i32);
37   |     ^^^^^^^^^^^^^^^^^
38
39error: because of the numeric bounds on `u8` prior to casting, this expression is always false
40  --> $DIR/invalid_upcast_comparisons.rs:27:5
41   |
42LL |     300 == (u8 as u32);
43   |     ^^^^^^^^^^^^^^^^^^
44
45error: because of the numeric bounds on `u8` prior to casting, this expression is always false
46  --> $DIR/invalid_upcast_comparisons.rs:28:5
47   |
48LL |     300 == (u8 as i32);
49   |     ^^^^^^^^^^^^^^^^^^
50
51error: because of the numeric bounds on `u8` prior to casting, this expression is always true
52  --> $DIR/invalid_upcast_comparisons.rs:30:5
53   |
54LL |     (u8 as u32) <= 300;
55   |     ^^^^^^^^^^^^^^^^^^
56
57error: because of the numeric bounds on `u8` prior to casting, this expression is always true
58  --> $DIR/invalid_upcast_comparisons.rs:31:5
59   |
60LL |     (u8 as i32) <= 300;
61   |     ^^^^^^^^^^^^^^^^^^
62
63error: because of the numeric bounds on `u8` prior to casting, this expression is always true
64  --> $DIR/invalid_upcast_comparisons.rs:32:5
65   |
66LL |     (u8 as u32) != 300;
67   |     ^^^^^^^^^^^^^^^^^^
68
69error: because of the numeric bounds on `u8` prior to casting, this expression is always true
70  --> $DIR/invalid_upcast_comparisons.rs:33:5
71   |
72LL |     (u8 as i32) != 300;
73   |     ^^^^^^^^^^^^^^^^^^
74
75error: because of the numeric bounds on `u8` prior to casting, this expression is always true
76  --> $DIR/invalid_upcast_comparisons.rs:34:5
77   |
78LL |     300 >= (u8 as u32);
79   |     ^^^^^^^^^^^^^^^^^^
80
81error: because of the numeric bounds on `u8` prior to casting, this expression is always true
82  --> $DIR/invalid_upcast_comparisons.rs:35:5
83   |
84LL |     300 >= (u8 as i32);
85   |     ^^^^^^^^^^^^^^^^^^
86
87error: because of the numeric bounds on `u8` prior to casting, this expression is always true
88  --> $DIR/invalid_upcast_comparisons.rs:36:5
89   |
90LL |     300 != (u8 as u32);
91   |     ^^^^^^^^^^^^^^^^^^
92
93error: because of the numeric bounds on `u8` prior to casting, this expression is always true
94  --> $DIR/invalid_upcast_comparisons.rs:37:5
95   |
96LL |     300 != (u8 as i32);
97   |     ^^^^^^^^^^^^^^^^^^
98
99error: because of the numeric bounds on `u8` prior to casting, this expression is always false
100  --> $DIR/invalid_upcast_comparisons.rs:40:5
101   |
102LL |     (u8 as i32) < 0;
103   |     ^^^^^^^^^^^^^^^
104
105error: because of the numeric bounds on `u8` prior to casting, this expression is always true
106  --> $DIR/invalid_upcast_comparisons.rs:41:5
107   |
108LL |     -5 != (u8 as i32);
109   |     ^^^^^^^^^^^^^^^^^
110
111error: because of the numeric bounds on `u8` prior to casting, this expression is always true
112  --> $DIR/invalid_upcast_comparisons.rs:43:5
113   |
114LL |     (u8 as i32) >= 0;
115   |     ^^^^^^^^^^^^^^^^
116
117error: because of the numeric bounds on `u8` prior to casting, this expression is always false
118  --> $DIR/invalid_upcast_comparisons.rs:44:5
119   |
120LL |     -5 == (u8 as i32);
121   |     ^^^^^^^^^^^^^^^^^
122
123error: because of the numeric bounds on `u8` prior to casting, this expression is always false
124  --> $DIR/invalid_upcast_comparisons.rs:47:5
125   |
126LL |     1337 == (u8 as i32);
127   |     ^^^^^^^^^^^^^^^^^^^
128
129error: because of the numeric bounds on `u8` prior to casting, this expression is always false
130  --> $DIR/invalid_upcast_comparisons.rs:48:5
131   |
132LL |     1337 == (u8 as u32);
133   |     ^^^^^^^^^^^^^^^^^^^
134
135error: because of the numeric bounds on `u8` prior to casting, this expression is always true
136  --> $DIR/invalid_upcast_comparisons.rs:50:5
137   |
138LL |     1337 != (u8 as i32);
139   |     ^^^^^^^^^^^^^^^^^^^
140
141error: because of the numeric bounds on `u8` prior to casting, this expression is always true
142  --> $DIR/invalid_upcast_comparisons.rs:51:5
143   |
144LL |     1337 != (u8 as u32);
145   |     ^^^^^^^^^^^^^^^^^^^
146
147error: because of the numeric bounds on `u8` prior to casting, this expression is always true
148  --> $DIR/invalid_upcast_comparisons.rs:65:5
149   |
150LL |     (u8 as i32) > -1;
151   |     ^^^^^^^^^^^^^^^^
152
153error: because of the numeric bounds on `u8` prior to casting, this expression is always false
154  --> $DIR/invalid_upcast_comparisons.rs:66:5
155   |
156LL |     (u8 as i32) < -1;
157   |     ^^^^^^^^^^^^^^^^
158
159error: because of the numeric bounds on `u8` prior to casting, this expression is always false
160  --> $DIR/invalid_upcast_comparisons.rs:82:5
161   |
162LL |     -5 >= (u8 as i32);
163   |     ^^^^^^^^^^^^^^^^^
164
165error: aborting due to 27 previous errors
166
167