about summary refs log tree commit diff
path: root/src/test/ui/impossible_range.rs
blob: 6345af001112f16a2a71d9cbd1da2df91e442fc5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Make sure that invalid ranges generate an error during HIR lowering, not an ICE

pub fn main() {
    ..;
    0..;
    ..1;
    0..1;
    ..=; //~ERROR inclusive range with no end
         //~^HELP bounded at the end
}

fn _foo1() {
    ..=1;
    0..=1;
    0..=; //~ERROR inclusive range with no end
          //~^HELP bounded at the end
}