]> git.lizzy.rs Git - rust.git/blob - tests/ui/binding/match-ref-binding.rs
Move /src/test to /tests
[rust.git] / tests / ui / binding / match-ref-binding.rs
1 // run-pass
2
3 fn destructure(x: Option<isize>) -> isize {
4     match x {
5       None => 0,
6       Some(ref v) => *v
7     }
8 }
9
10 pub fn main() {
11     assert_eq!(destructure(Some(22)), 22);
12 }