-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Description
The following code:
use m::{START, STOP};
fn main() {
let i = 12u32;
match i {
20...30 => println!("ok"),
START...END => println!("still ok"),
m::START...m::END => println!("bad"),
_ => (),
}
}
mod m {
const START: u32 = 4;
const END: u32 = 14;
}
Produces this error:
<anon>:10:17: 10:20 error: expected one of `::`, `=>`, or `|`, found `...`
<anon>:10 m::START...m::END => println!("bad"),
^~~
Putting parens around m::START
and m::END
doesn't fix it.
Metadata
Metadata
Assignees
Labels
A-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.