]> git.lizzy.rs Git - rust.git/blob - tests/ui/impossible_range.fixed
Rollup merge of #107692 - Swatinem:printsizeyield, r=compiler-errors
[rust.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 }