mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
21 lines
375 B
Rust
21 lines
375 B
Rust
|
// run-rustfix
|
||
|
// Make sure that invalid ranges generate an error during parsing, not an ICE
|
||
|
|
||
|
#![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
|
||
|
}
|