summary refs log tree commit diff
path: root/src/test/ui/unique/unique-destructure.rs
blob: 9b9f95dfbcae608076fafd39f11f21c501dcc7b5 (plain)
1
2
3
4
5
6
7
8
9
10
// 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);
}