summaryrefslogtreecommitdiffstats
path: root/tests/ui/box/unit/unique-pat-3.rs
blob: 2e81f898d0c98e04b619f6deb2e8350917d2b501 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// run-pass
#![allow(dead_code)]
#![allow(non_camel_case_types)]

enum bar { u(Box<isize>), w(isize), }

pub fn main() {
    let v = match bar::u(10.into()) {
        bar::u(a) => {
            println!("{}", a);
            *a
        }
        _ => { 66 }
    };
    assert_eq!(v, 10);
}