about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/run-pass/ifmt.rs5
1 files changed, 5 insertions, 0 deletions
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