Added tests for eq and neq invalid upcast comparisons
This commit is contained in:
parent
d050d601fc
commit
44ab23703a
|
@ -19,4 +19,7 @@ fn main() {
|
||||||
|
|
||||||
-5 > (zero as i32); //~ERROR because of the numeric bounds on `zero` prior to casting, this expression is always false
|
-5 > (zero as i32); //~ERROR because of the numeric bounds on `zero` prior to casting, this expression is always false
|
||||||
-5 >= (u8_max as i32); //~ERROR because of the numeric bounds on `u8_max` prior to casting, this expression is always false
|
-5 >= (u8_max as i32); //~ERROR because of the numeric bounds on `u8_max` prior to casting, this expression is always false
|
||||||
|
|
||||||
|
-5 == (zero as i32); //~ERROR because of the numeric bounds on `zero` prior to casting, this expression is always false
|
||||||
|
-5 != (u8_max as i32); //~ERROR because of the numeric bounds on `u8_max` prior to casting, this expression is always true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue