rust/tests/ui/invalid_upcast_comparisons.stderr
2017-02-07 21:05:30 +01:00

63 lines
2.9 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; //~ERROR because of the numeric bounds on `u8_max` prior to casting, this expression is always false
| ^^^^^^^^^^^^^^^^^^^^^
|
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 false
| ^^^^^^^^^^^^^^^^^^
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
| ^^^^^^^^^^^^^^^^^^
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 true
| ^^^^^^^^^^^^^^^^^^
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 `zero` prior to casting, this expression is always false
| ^^^^^^^^^^^^^^^^^^
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
| ^^^^^^^^^^^^^^^^^^^^^
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 `u8_max` prior to casting, this expression is always false
| ^^^^^^^^^^^^^^^^^^^^^^^
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 `zero` prior to casting, this expression is always false
| ^^^^^^^^^^^^^^^^^^^
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 because of the numeric bounds on `u8_max` prior to casting, this expression is always true
| ^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 9 previous errors