]> git.lizzy.rs Git - rust.git/blob - src/test/ui/binding/match-pattern-lit.rs
Merge commit '5988bbd24aa87732bfa1d111ba00bcdaa22c481a' into sync_cg_clif-2020-11-27
[rust.git] / src / test / ui / binding / match-pattern-lit.rs
1 // run-pass
2
3
4 fn altlit(f: isize) -> isize {
5     match f {
6       10 => { println!("case 10"); return 20; }
7       11 => { println!("case 11"); return 22; }
8       _  => panic!("the impossible happened")
9     }
10 }
11
12 pub fn main() {
13     assert_eq!(altlit(10), 20);
14     assert_eq!(altlit(11), 22);
15 }