Created
December 5, 2014 23:14
-
-
Save mrhota/aa8ce414a5c926e372f1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn foo() { | |
let x = &4i; | |
match x { | |
// wanted to type `e @ &1 ... &4` | |
e @ &1 ... 4 => println!("Got a small value: {}", e), | |
&val => println!("Got a value: {}", val), | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment