This website requires JavaScript.
Explore
Help
Register
Sign In
mikros
/
rust
Watch
1
Star
0
Fork
0
You've already forked rust
Code
Issues
Pull Requests
Packages
Projects
Releases
Wiki
Activity
61ed2cfb55
rust
/
src
/
test
/
run-pass
/
match-range-static.rs
10 lines
115 B
Rust
Raw
Normal View
History
Unescape
Escape
Allow non-literal static range pattern for match arms Fix unintended error problem of: static s: int = 1; static e: int = 42; fn main() { match 7 { s..e => (), ^~ error: expected `=>` but found `..` _ => (), } }
2013-05-04 20:57:14 -05:00
static
s
:
int
=
1
;
static
e
:
int
=
42
;
Fix run-pass tests to have 'pub fn main' This is required by the check-fast target because each test is slurped up into a submodule.
2013-09-25 02:43:37 -05:00
pub
fn
main
(
)
{
Allow non-literal static range pattern for match arms Fix unintended error problem of: static s: int = 1; static e: int = 42; fn main() { match 7 { s..e => (), ^~ error: expected `=>` but found `..` _ => (), } }
2013-05-04 20:57:14 -05:00
match
7
{
s
..
e
=
>
(
)
,
_
=
>
(
)
,
}
}
Reference in New Issue
Copy Permalink