Added tests for eq and neq invalid upcast comparisons

This commit is contained in:
Taylor Cramer 2016-03-28 22:08:58 -07:00 committed by mcarton
parent d050d601fc
commit 44ab23703a
1 changed files with 3 additions and 0 deletions

View File

@ -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 >= (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
}