]> git.lizzy.rs Git - rust.git/blob - tests/ui/lint/lint-type-limits3.rs
Rollup merge of #106570 - Xaeroxe:div-duration-tests, r=JohnTitor
[rust.git] / tests / ui / lint / lint-type-limits3.rs
1 #![allow(dead_code)]
2 #![warn(overflowing_literals)]
3
4 // compile-flags: -D unused-comparisons
5 fn main() { }
6
7 fn qux() {
8     let mut i = 1i8;
9     while 200 != i { //~ ERROR comparison is useless due to type limits
10                      //~| WARN literal out of range for `i8`
11         i += 1;
12     }
13 }