2017-02-07 14:05:30 -06:00
|
|
|
error: because of the numeric bounds on `u8_max` prior to casting, this expression is always false
|
|
|
|
--> $DIR/invalid_upcast_comparisons.rs:10:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
10 | (u8_max as u32) > 300;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: lint level defined here
|
|
|
|
--> $DIR/invalid_upcast_comparisons.rs:4:9
|
|
|
|
|
|
|
|
|
4 | #![deny(invalid_upcast_comparisons)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: because of the numeric bounds on `zero` prior to casting, this expression is always false
|
|
|
|
--> $DIR/invalid_upcast_comparisons.rs:13:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
13 | (zero as i32) < -5;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: because of the numeric bounds on `zero` prior to casting, this expression is always true
|
|
|
|
--> $DIR/invalid_upcast_comparisons.rs:16:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
16 | -5 < (zero as i32);
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: because of the numeric bounds on `zero` prior to casting, this expression is always true
|
|
|
|
--> $DIR/invalid_upcast_comparisons.rs:17:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
17 | 0 <= (zero as i32);
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: because of the numeric bounds on `zero` prior to casting, this expression is always false
|
|
|
|
--> $DIR/invalid_upcast_comparisons.rs:20:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
20 | -5 > (zero as i32);
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: because of the numeric bounds on `u8_max` prior to casting, this expression is always false
|
|
|
|
--> $DIR/invalid_upcast_comparisons.rs:21:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
21 | -5 >= (u8_max as i32);
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: because of the numeric bounds on `u8_max` prior to casting, this expression is always false
|
|
|
|
--> $DIR/invalid_upcast_comparisons.rs:22:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
22 | 1337 == (u8_max as i32);
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: because of the numeric bounds on `zero` prior to casting, this expression is always false
|
|
|
|
--> $DIR/invalid_upcast_comparisons.rs:24:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
24 | -5 == (zero as i32);
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: because of the numeric bounds on `u8_max` prior to casting, this expression is always true
|
|
|
|
--> $DIR/invalid_upcast_comparisons.rs:25:5
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
25 | -5 != (u8_max as i32);
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: aborting due to 9 previous errors
|
|
|
|
|