diff options
| author | bors <bors@rust-lang.org> | 2013-09-03 09:50:58 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-09-03 09:50:58 -0700 |
| commit | dee9d7f97f2e679eecd21dfcbc7628c7caf5bd7e (patch) | |
| tree | 52fc5f068e2c7152938cd9b678f1c60f95d8022d /src/test | |
| parent | c14daba3b2f3218438a6928ed0676986c6339d48 (diff) | |
| parent | 7e7024718a8f9668c3ae6f885ba77d2957362d46 (diff) | |
| download | rust-dee9d7f97f2e679eecd21dfcbc7628c7caf5bd7e.tar.gz rust-dee9d7f97f2e679eecd21dfcbc7628c7caf5bd7e.zip | |
auto merge of #8945 : alexcrichton/rust/ifmt-dont-move, r=thestinger
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/run-pass/ifmt.rs | 5 |
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 |
