mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
18 lines
331 B
Rust
18 lines
331 B
Rust
//@ 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);
|
|
}
|