about summary refs log tree commit diff
path: root/src/libstd/old_io
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-03-24 14:50:46 -0700
committerAlex Crichton <alex@alexcrichton.com>2015-03-24 14:50:46 -0700
commita1d2e62c1f94930aaab2f9d56b3ee4f34f95369a (patch)
tree3ed0a12ba754e76dc1af00f6a22e34a9cfd1bd88 /src/libstd/old_io
parent6da0b9dedbc975c3d9ae973216745de9dab535d2 (diff)
parent7e3ee02006ec53ff176fc3490ba01eb2a9c823b8 (diff)
downloadrust-a1d2e62c1f94930aaab2f9d56b3ee4f34f95369a.tar.gz
rust-a1d2e62c1f94930aaab2f9d56b3ee4f34f95369a.zip
rollup merge of #23630: nrc/coerce-tidy
See notes on the first commit

Closes #18601

r? @nikomatsakis

cc @eddyb
Diffstat (limited to 'src/libstd/old_io')
-rw-r--r--src/libstd/old_io/stdio.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/old_io/stdio.rs b/src/libstd/old_io/stdio.rs
index fd3fae641e2..90d27084911 100644
--- a/src/libstd/old_io/stdio.rs
+++ b/src/libstd/old_io/stdio.rs
@@ -337,10 +337,10 @@ pub fn set_stderr(_stderr: Box<Writer + Send>) -> Option<Box<Writer + Send>> {
 //      })
 //  })
 fn with_task_stdout<F>(f: F) where F: FnOnce(&mut Writer) -> IoResult<()> {
-    let mut my_stdout = LOCAL_STDOUT.with(|slot| {
+    let mut my_stdout: Box<Writer + Send> = LOCAL_STDOUT.with(|slot| {
         slot.borrow_mut().take()
     }).unwrap_or_else(|| {
-        box stdout() as Box<Writer + Send>
+        box stdout()
     });
     let result = f(&mut *my_stdout);
     let mut var = Some(my_stdout);