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