rust/tests/ui/invalid_upcast_comparisons.stderr
2017-02-08 14:58:07 +01:00

63 lines
2.0 KiB
Plaintext

error: because of the numeric bounds on `u8_max` prior to casting, this expression is always false
--> $DIR/invalid_upcast_comparisons.rs:10:5
|
10 | (u8_max as u32) > 300;
| ^^^^^^^^^^^^^^^^^^^^^
|
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
|
13 | (zero as i32) < -5;
| ^^^^^^^^^^^^^^^^^^
error: because of the numeric bounds on `zero` prior to casting, this expression is always true
--> $DIR/invalid_upcast_comparisons.rs:16:5
|
16 | -5 < (zero as i32);
| ^^^^^^^^^^^^^^^^^^
error: because of the numeric bounds on `zero` prior to casting, this expression is always true
--> $DIR/invalid_upcast_comparisons.rs:17:5
|
17 | 0 <= (zero as i32);
| ^^^^^^^^^^^^^^^^^^
error: because of the numeric bounds on `zero` prior to casting, this expression is always false
--> $DIR/invalid_upcast_comparisons.rs:20:5
|
20 | -5 > (zero as i32);
| ^^^^^^^^^^^^^^^^^^
error: because of the numeric bounds on `u8_max` prior to casting, this expression is always false
--> $DIR/invalid_upcast_comparisons.rs:21:5
|
21 | -5 >= (u8_max as i32);
| ^^^^^^^^^^^^^^^^^^^^^
error: because of the numeric bounds on `u8_max` prior to casting, this expression is always false
--> $DIR/invalid_upcast_comparisons.rs:22:5
|
22 | 1337 == (u8_max as i32);
| ^^^^^^^^^^^^^^^^^^^^^^^
error: because of the numeric bounds on `zero` prior to casting, this expression is always false
--> $DIR/invalid_upcast_comparisons.rs:24:5
|
24 | -5 == (zero as i32);
| ^^^^^^^^^^^^^^^^^^^
error: because of the numeric bounds on `u8_max` prior to casting, this expression is always true
--> $DIR/invalid_upcast_comparisons.rs:25:5
|
25 | -5 != (u8_max as i32);
| ^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 9 previous errors