auto merge of #6245 : youknowone/rust/match-range-static, r=graydon
Fix unintended error problem of:
````
static s: int = 1;
static e: int = 42;
fn main() {
match 7 {
s..e => (),
^~ error: expected `=>` but found `..`
_ => (),
}
}
````
This commit is contained in:
commit
7b2020f2c3
2 changed files with 18 additions and 2 deletions
10
src/test/run-pass/match-range-static.rs
Normal file
10
src/test/run-pass/match-range-static.rs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
static s: int = 1;
|
||||
static e: int = 42;
|
||||
|
||||
fn main() {
|
||||
match 7 {
|
||||
s..e => (),
|
||||
_ => (),
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue