From 7e7024718a8f9668c3ae6f885ba77d2957362d46 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 2 Sep 2013 23:53:13 -0700 Subject: Don't have format! move out of local variables --- src/test/run-pass/ifmt.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/test') diff --git a/src/test/run-pass/ifmt.rs b/src/test/run-pass/ifmt.rs index 44d4386e0c5..236fa44939a 100644 --- a/src/test/run-pass/ifmt.rs +++ b/src/test/run-pass/ifmt.rs @@ -215,6 +215,11 @@ pub fn main() { test_write(); test_print(); + + // make sure that format! doesn't move out of local variables + let a = ~3; + format!("{:?}", a); + format!("{:?}", a); } // Basic test to make sure that we can invoke the `write!` macro with an -- cgit 1.4.1-3-g733a5