2020-07-02 00:32:12 -05:00
|
|
|
// run-rustfix
|
2020-01-10 23:49:43 -06:00
|
|
|
// Make sure that invalid ranges generate an error during parsing, not an ICE
|
2016-03-15 12:02:59 -05:00
|
|
|
|
2020-07-02 00:32:12 -05:00
|
|
|
#![allow(path_statements)]
|
|
|
|
|
2016-03-15 12:02:59 -05:00
|
|
|
pub fn main() {
|
|
|
|
..;
|
|
|
|
0..;
|
|
|
|
..1;
|
|
|
|
0..1;
|
2017-09-19 00:40:04 -05:00
|
|
|
..=; //~ERROR inclusive range with no end
|
2020-01-10 23:49:43 -06:00
|
|
|
//~^HELP use `..` instead
|
2017-12-14 01:05:49 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
fn _foo1() {
|
2017-09-19 00:40:04 -05:00
|
|
|
..=1;
|
|
|
|
0..=1;
|
2017-12-14 01:05:49 -06:00
|
|
|
0..=; //~ERROR inclusive range with no end
|
2020-01-10 23:49:43 -06:00
|
|
|
//~^HELP use `..` instead
|
2016-03-15 12:02:59 -05:00
|
|
|
}
|