Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #![feature(pattern_parentheses)]
- fn main() {
- let x = &4;
- match x {
- // wanted to type `e @ &1 ... &4`
- e @ &(1...4) => println!("Got a small value: {}", e),
- &val => println!("Got a value: {}", val),
- }
- }
Add Comment
Please, Sign In to add comment