From a81f88d4d642d0cae324b301df3fe089f0d090b4 Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Wed, 22 Jul 2015 15:30:05 +0200 Subject: [PATCH] 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`. --- src/test/run-pass/new-box-syntax.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/test/run-pass/new-box-syntax.rs b/src/test/run-pass/new-box-syntax.rs index d2ebd6863fa..50369995001 100644 --- a/src/test/run-pass/new-box-syntax.rs +++ b/src/test/run-pass/new-box-syntax.rs @@ -31,4 +31,9 @@ pub fn main() { let y: Box = box 2; let b: Box = box()(1 + 2); let c = box()(3 + 4); + + let s: Box = box Structure { + x: 3, + y: 4, + }; }