You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A-parserArea: The parsing of Rust source code to an ASTE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
use m::{START,STOP};fnmain(){let i = 12u32;match i {20...30 => println!("ok"),START...END => println!("still ok"),
m::START...m::END => println!("bad"),
_ => (),}}mod m {constSTART:u32 = 4;constEND: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.
The text was updated successfully, but these errors were encountered:
Gankra
added
A-parser
Area: The parsing of Rust source code to an AST
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
labels
Jan 21, 2015
Fixing #21475. Right now this code can not be parsed:
```rust
use m::{START, END};
fn main() {
match 42u32 {
m::START...m::END => {}, // error: expected one of `::`, `=>`, or `|`, found `...`
_ => {},
}
}
mod m {
pub const START: u32 = 4;
pub const END: u32 = 14;
}
```
I fixed the parser and added test for this case, but now there are still problems with mixing literals and paths in interval:
```rust
match 42u32 {
0u32...m::END => {}, // mismatched types in range [E0031]
m::START...59u32 => {}, // mismatched types in range [E0031]
_ => {},
}
}
```
I'll try fix this problem and need review.
A-parserArea: The parsing of Rust source code to an ASTE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
The following code:
Produces this error:
Putting parens around
m::START
andm::END
doesn't fix it.The text was updated successfully, but these errors were encountered: