rust/src/test/ui/unique/unique-destructure.rs
2019-07-27 18:56:16 +03:00

10 lines
193 B
Rust

// run-pass
#![feature(box_patterns)]
#![feature(box_syntax)]
struct Foo { a: isize, b: isize }
pub fn main() {
let box Foo{a, b} = box Foo{a: 100, b: 200};
assert_eq!(a + b, 300);
}