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