diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/unique/unique-destructure.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/ui/unique/unique-destructure.rs b/src/test/ui/unique/unique-destructure.rs new file mode 100644 index 000000000..7207ac962 --- /dev/null +++ b/src/test/ui/unique/unique-destructure.rs @@ -0,0 +1,9 @@ +// run-pass +#![feature(box_patterns)] + +struct Foo { a: isize, b: isize } + +pub fn main() { + let box Foo{ a, b } = Box::new(Foo { a: 100, b: 200 }); + assert_eq!(a + b, 300); +} |