]> git.lizzy.rs Git - rust.git/blob - tests/ui/lint/lint-type-limits2.rs
Auto merge of #106884 - clubby789:fieldless-enum-debug, r=michaelwoerister
[rust.git] / tests / ui / lint / lint-type-limits2.rs
1 #![allow(dead_code)]
2 #![warn(overflowing_literals)]
3
4 // compile-flags: -D unused-comparisons
5 fn main() { }
6
7
8 fn bar() -> i8 {
9     return 123;
10 }
11
12 fn baz() -> bool {
13     128 > bar() //~ ERROR comparison is useless due to type limits
14                 //~| WARN literal out of range for `i8`
15 }