summaryrefslogtreecommitdiffstats
path: root/tests/ui/lint/deny-overflowing-literals.rs
blob: 21c8ba7d6ce4e6be5f4343f47ba277afc5d0b516 (plain)
1
2
3
4
5
6
7
fn main() {
    let x: u8 = 256;
    //~^ error: literal out of range for `u8`

    for _ in 0..256u8 {}
    //~^ error: range endpoint is out of range for `u8`
}