mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 02:33:55 +00:00
17 lines
290 B
Rust
17 lines
290 B
Rust
// 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);
|
|
}
|