rust/tests/ui/impossible_range.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
377 B
Rust
Raw Normal View History

2020-07-02 00:32:12 -05:00
// run-rustfix
// Make sure that invalid ranges generate an error during parsing, not an ICE
2020-07-02 00:32:12 -05:00
#![allow(path_statements)]
pub fn main() {
..;
0..;
..1;
0..1;
..=; //~ERROR inclusive range with no end
//~^HELP use `..` instead
}
fn _foo1() {
..=1;
0..=1;
0..=; //~ERROR inclusive range with no end
//~^HELP use `..` instead
}