rust/tests/ui/regions/regions-self-in-enums.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
331 B
Rust
Raw Normal View History

//@ 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;
2012-08-06 19:34:08 +00:00
match y {
int_wrapper::int_wrapper_ctor(zz) => { z = zz; }
}
2014-10-15 01:07:11 +00:00
println!("{}", *z);
}