]> git.proxmox.com Git - rustc.git/blob - tests/ui/impossible_range.fixed
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / impossible_range.fixed
1 // run-rustfix
2 // Make sure that invalid ranges generate an error during parsing, not an ICE
3
4 #![allow(path_statements)]
5
6 pub fn main() {
7 ..;
8 0..;
9 ..1;
10 0..1;
11 ..; //~ERROR inclusive range with no end
12 //~^HELP use `..` instead
13 }
14
15 fn _foo1() {
16 ..=1;
17 0..=1;
18 0..; //~ERROR inclusive range with no end
19 //~^HELP use `..` instead
20 }