summaryrefslogtreecommitdiffstats
path: root/src/test/ui/binding/match-pattern-lit.rs
blob: c9c6135e2e661c19032fe729668a2d30e4700f1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// run-pass


fn altlit(f: isize) -> isize {
    match f {
      10 => { println!("case 10"); return 20; }
      11 => { println!("case 11"); return 22; }
      _  => panic!("the impossible happened")
    }
}

pub fn main() {
    assert_eq!(altlit(10), 20);
    assert_eq!(altlit(11), 22);
}