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:
parent
9d6cc05a06
commit
a81f88d4d6
@ -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,
|
||||
};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user