summaryrefslogtreecommitdiffstats
path: root/tests/ui/regions/regions-self-in-enums.rs
blob: c2e4b2ff10dfeb4b976e22b2401e848d0087e732 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// run-pass
#![allow(unused_mut)]
#![allow(non_camel_case_types)]

enum int_wrapper<'a> {
    int_wrapper_ctor(&'a isize)
}

pub fn main() {
    let x = 3;
    let y = int_wrapper::int_wrapper_ctor(&x);
    let mut z : &isize;
    match y {
        int_wrapper::int_wrapper_ctor(zz) => { z = zz; }
    }
    println!("{}", *z);
}