rust/tests/ui/invalid_upcast_comparisons.stderr

167 lines
5.5 KiB
Plaintext
Raw Normal View History

error: because of the numeric bounds on `u8` prior to casting, this expression is always false
2018-10-06 18:18:06 +02:00
--> $DIR/invalid_upcast_comparisons.rs:26:5
|
2018-10-06 18:18:06 +02:00
26 | (u8 as u32) > 300;
| ^^^^^^^^^^^^^^^^^
|
= note: `-D clippy::invalid-upcast-comparisons` implied by `-D warnings`
error: because of the numeric bounds on `u8` prior to casting, this expression is always false
2018-10-06 18:18:06 +02:00
--> $DIR/invalid_upcast_comparisons.rs:27:5
|
2018-10-06 18:18:06 +02:00
27 | (u8 as i32) > 300;
| ^^^^^^^^^^^^^^^^^
error: because of the numeric bounds on `u8` prior to casting, this expression is always false
2018-10-06 18:18:06 +02:00
--> $DIR/invalid_upcast_comparisons.rs:28:5
|
2018-10-06 18:18:06 +02:00
28 | (u8 as u32) == 300;
| ^^^^^^^^^^^^^^^^^^
error: because of the numeric bounds on `u8` prior to casting, this expression is always false
2018-10-06 18:18:06 +02:00
--> $DIR/invalid_upcast_comparisons.rs:29:5
|
2018-10-06 18:18:06 +02:00
29 | (u8 as i32) == 300;
| ^^^^^^^^^^^^^^^^^^
error: because of the numeric bounds on `u8` prior to casting, this expression is always false
2018-10-06 18:18:06 +02:00
--> $DIR/invalid_upcast_comparisons.rs:30:5
|
2018-10-06 18:18:06 +02:00
30 | 300 < (u8 as u32);
| ^^^^^^^^^^^^^^^^^
error: because of the numeric bounds on `u8` prior to casting, this expression is always false
2018-10-06 18:18:06 +02:00
--> $DIR/invalid_upcast_comparisons.rs:31:5
|
2018-10-06 18:18:06 +02:00
31 | 300 < (u8 as i32);
| ^^^^^^^^^^^^^^^^^
error: because of the numeric bounds on `u8` prior to casting, this expression is always false
2018-10-06 18:18:06 +02:00
--> $DIR/invalid_upcast_comparisons.rs:32:5
|
2018-10-06 18:18:06 +02:00
32 | 300 == (u8 as u32);
| ^^^^^^^^^^^^^^^^^^
error: because of the numeric bounds on `u8` prior to casting, this expression is always false
2018-10-06 18:18:06 +02:00
--> $DIR/invalid_upcast_comparisons.rs:33:5
|
2018-10-06 18:18:06 +02:00
33 | 300 == (u8 as i32);
| ^^^^^^^^^^^^^^^^^^
error: because of the numeric bounds on `u8` prior to casting, this expression is always true
2018-10-06 18:18:06 +02:00
--> $DIR/invalid_upcast_comparisons.rs:35:5
|
2018-10-06 18:18:06 +02:00
35 | (u8 as u32) <= 300;
| ^^^^^^^^^^^^^^^^^^
error: because of the numeric bounds on `u8` prior to casting, this expression is always true
2018-10-06 18:18:06 +02:00
--> $DIR/invalid_upcast_comparisons.rs:36:5
|
2018-10-06 18:18:06 +02:00
36 | (u8 as i32) <= 300;
| ^^^^^^^^^^^^^^^^^^
error: because of the numeric bounds on `u8` prior to casting, this expression is always true
2018-10-06 18:18:06 +02:00
--> $DIR/invalid_upcast_comparisons.rs:37:5
|
2018-10-06 18:18:06 +02:00
37 | (u8 as u32) != 300;
| ^^^^^^^^^^^^^^^^^^
error: because of the numeric bounds on `u8` prior to casting, this expression is always true
2018-10-06 18:18:06 +02:00
--> $DIR/invalid_upcast_comparisons.rs:38:5
|
2018-10-06 18:18:06 +02:00
38 | (u8 as i32) != 300;
| ^^^^^^^^^^^^^^^^^^
error: because of the numeric bounds on `u8` prior to casting, this expression is always true
2018-10-06 18:18:06 +02:00
--> $DIR/invalid_upcast_comparisons.rs:39:5
|
2018-10-06 18:18:06 +02:00
39 | 300 >= (u8 as u32);
| ^^^^^^^^^^^^^^^^^^
error: because of the numeric bounds on `u8` prior to casting, this expression is always true
2018-10-06 18:18:06 +02:00
--> $DIR/invalid_upcast_comparisons.rs:40:5
|
2018-10-06 18:18:06 +02:00
40 | 300 >= (u8 as i32);
| ^^^^^^^^^^^^^^^^^^
error: because of the numeric bounds on `u8` prior to casting, this expression is always true
2018-10-06 18:18:06 +02:00
--> $DIR/invalid_upcast_comparisons.rs:41:5
|
2018-10-06 18:18:06 +02:00
41 | 300 != (u8 as u32);
| ^^^^^^^^^^^^^^^^^^
error: because of the numeric bounds on `u8` prior to casting, this expression is always true
2018-10-06 18:18:06 +02:00
--> $DIR/invalid_upcast_comparisons.rs:42:5
|
2018-10-06 18:18:06 +02:00
42 | 300 != (u8 as i32);
| ^^^^^^^^^^^^^^^^^^
error: because of the numeric bounds on `u8` prior to casting, this expression is always false
2018-10-06 18:18:06 +02:00
--> $DIR/invalid_upcast_comparisons.rs:45:5
|
2018-10-06 18:18:06 +02:00
45 | (u8 as i32) < 0;
| ^^^^^^^^^^^^^^^
error: because of the numeric bounds on `u8` prior to casting, this expression is always true
2018-10-06 18:18:06 +02:00
--> $DIR/invalid_upcast_comparisons.rs:46:5
|
2018-10-06 18:18:06 +02:00
46 | -5 != (u8 as i32);
| ^^^^^^^^^^^^^^^^^
error: because of the numeric bounds on `u8` prior to casting, this expression is always true
2018-10-06 18:18:06 +02:00
--> $DIR/invalid_upcast_comparisons.rs:48:5
|
2018-10-06 18:18:06 +02:00
48 | (u8 as i32) >= 0;
| ^^^^^^^^^^^^^^^^
error: because of the numeric bounds on `u8` prior to casting, this expression is always false
2018-10-06 18:18:06 +02:00
--> $DIR/invalid_upcast_comparisons.rs:49:5
|
2018-10-06 18:18:06 +02:00
49 | -5 == (u8 as i32);
| ^^^^^^^^^^^^^^^^^
error: because of the numeric bounds on `u8` prior to casting, this expression is always false
2018-10-06 18:18:06 +02:00
--> $DIR/invalid_upcast_comparisons.rs:52:5
|
2018-10-06 18:18:06 +02:00
52 | 1337 == (u8 as i32);
| ^^^^^^^^^^^^^^^^^^^
error: because of the numeric bounds on `u8` prior to casting, this expression is always false
2018-10-06 18:18:06 +02:00
--> $DIR/invalid_upcast_comparisons.rs:53:5
|
2018-10-06 18:18:06 +02:00
53 | 1337 == (u8 as u32);
| ^^^^^^^^^^^^^^^^^^^
error: because of the numeric bounds on `u8` prior to casting, this expression is always true
2018-10-06 18:18:06 +02:00
--> $DIR/invalid_upcast_comparisons.rs:55:5
|
2018-10-06 18:18:06 +02:00
55 | 1337 != (u8 as i32);
| ^^^^^^^^^^^^^^^^^^^
error: because of the numeric bounds on `u8` prior to casting, this expression is always true
2018-10-06 18:18:06 +02:00
--> $DIR/invalid_upcast_comparisons.rs:56:5
|
2018-10-06 18:18:06 +02:00
56 | 1337 != (u8 as u32);
| ^^^^^^^^^^^^^^^^^^^
error: because of the numeric bounds on `u8` prior to casting, this expression is always true
2018-10-06 18:18:06 +02:00
--> $DIR/invalid_upcast_comparisons.rs:71:5
|
2018-10-06 18:18:06 +02:00
71 | (u8 as i32) > -1;
| ^^^^^^^^^^^^^^^^
error: because of the numeric bounds on `u8` prior to casting, this expression is always false
2018-10-06 18:18:06 +02:00
--> $DIR/invalid_upcast_comparisons.rs:72:5
|
2018-10-06 18:18:06 +02:00
72 | (u8 as i32) < -1;
| ^^^^^^^^^^^^^^^^
error: because of the numeric bounds on `u8` prior to casting, this expression is always false
2018-10-06 18:18:06 +02:00
--> $DIR/invalid_upcast_comparisons.rs:88:5
|
2018-10-06 18:18:06 +02:00
88 | -5 >= (u8 as i32);
| ^^^^^^^^^^^^^^^^^
2018-01-16 17:06:27 +01:00
error: aborting due to 27 previous errors