aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/issue-3726.rs
blob: ced87a57457a4590346247d9782ba79cbd483517 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
pub enum TypeCtor {
    Slice,
    Array,
}
pub struct ApplicationTy(TypeCtor);

macro_rules! ty_app {
    ($ctor:pat) => {
        ApplicationTy($ctor)
    };
}

pub fn foo(ty: ApplicationTy) {
    match ty {
        ty_app!(TypeCtor::Array) => {}
    }
}