Skip to content

Instantly share code, notes, and snippets.

@mrhota
Created December 5, 2014 23:14
Show Gist options
  • Save mrhota/aa8ce414a5c926e372f1 to your computer and use it in GitHub Desktop.
Save mrhota/aa8ce414a5c926e372f1 to your computer and use it in GitHub Desktop.
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