Add actual use of the `struct Structure` lying dormant in `new-box-syntax.rs`.

The original test program exercised the (garbage-collected heap)
allocation form `box (GC) ...`, feeding an instance of `Structure` in
as the expression. This obviously went away when `GC` went away, but
there's no reason for us not to include an appropriate unit test here
for the same form, just for heap-allocated instances of `Structure`.
This commit is contained in:
Felix S. Klock II 2015-07-22 15:30:05 +02:00
parent 9d6cc05a06
commit a81f88d4d6
1 changed files with 5 additions and 0 deletions

View File

@ -31,4 +31,9 @@ pub fn main() {
let y: Box<isize> = box 2;
let b: Box<isize> = box()(1 + 2);
let c = box()(3 + 4);
let s: Box<Structure> = box Structure {
x: 3,
y: 4,
};
}