]> git.lizzy.rs Git - rust.git/blob - src/test/ui/binding/match-ref-binding.rs
Auto merge of #104730 - petrochenkov:modchild5, r=cjgillot
[rust.git] / src / test / 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 }