summaryrefslogtreecommitdiffstats
path: root/tests/ui/binding/expr-match-panic.rs
blob: 4b6b6e072c096d094239783392c5dea9f7651a1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// run-pass


fn test_simple() {
    let r = match true { true => { true } false => { panic!() } };
    assert_eq!(r, true);
}

fn test_box() {
    let r = match true { true => { vec![10] } false => { panic!() } };
    assert_eq!(r[0], 10);
}

pub fn main() { test_simple(); test_box(); }