]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impossible_range.rs
Rollup merge of #57132 - daxpedda:master, r=steveklabnik
[rust.git] / src / test / ui / impossible_range.rs
1 // Make sure that invalid ranges generate an error during HIR lowering, not an ICE
2
3 pub fn main() {
4     ..;
5     0..;
6     ..1;
7     0..1;
8     ..=; //~ERROR inclusive range with no end
9          //~^HELP bounded at the end
10 }
11
12 fn _foo1() {
13     ..=1;
14     0..=1;
15     0..=; //~ERROR inclusive range with no end
16           //~^HELP bounded at the end
17 }