rust/tests/ui/invalid_upcast_comparisons.stderr

63 lines
2.0 KiB
Plaintext
Raw Normal View History

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;
| ^^^^^^^^^^^^^^^^^^^^^
|
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;
| ^^^^^^^^^^^^^^^^^^
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);
| ^^^^^^^^^^^^^^^^^^
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);
| ^^^^^^^^^^^^^^^^^^
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);
| ^^^^^^^^^^^^^^^^^^
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);
| ^^^^^^^^^^^^^^^^^^^^^
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);
| ^^^^^^^^^^^^^^^^^^^^^^^
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);
| ^^^^^^^^^^^^^^^^^^^
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);
| ^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 9 previous errors