return 123;
}
-fn baz() -> bool {
- 128 > bar() //~ ERROR comparison is useless due to type limits
- //~^ WARNING literal out of range for i8
-}
-
fn bleh() {
let u = 42u8;
let _ = u > 255; //~ ERROR comparison is useless due to type limits
let _ = u >= 0; //~ ERROR comparison is useless due to type limits
let _ = 0 <= u; //~ ERROR comparison is useless due to type limits
}
-
-fn qux() {
- let mut i = 1i8;
- while 200 != i { //~ ERROR comparison is useless due to type limits
- //~^ WARNING literal out of range for i8
- i += 1;
- }
-}