about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorTyler Mandry <tmandry@gmail.com>2020-08-04 18:42:36 -0700
committerSergio Benitez <sb@sergio.bz>2020-10-22 18:15:44 -0700
commitd0d0e7820806bbb89a2733bae8f9aaa9c78345d0 (patch)
treeb7a7a24124c08c5da4fd25ab60b892d3b35bdacc /compiler
parent6b9fbf212a06944ff23325d2d63215805dc3c6c3 (diff)
downloadrust-d0d0e7820806bbb89a2733bae8f9aaa9c78345d0.tar.gz
rust-d0d0e7820806bbb89a2733bae8f9aaa9c78345d0.zip
Capture output from threads spawned in tests
Fixes #42474.
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_interface/src/util.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_interface/src/util.rs b/compiler/rustc_interface/src/util.rs
index c1b359c7d0d..73003d8ebd6 100644
--- a/compiler/rustc_interface/src/util.rs
+++ b/compiler/rustc_interface/src/util.rs
@@ -113,6 +113,11 @@ impl Write for Sink {
         Ok(())
     }
 }
+impl io::LocalOutput for Sink {
+    fn clone_box(&self) -> Box<dyn io::LocalOutput> {
+        Box::new(Self(self.0.clone()))
+    }
+}
 
 /// Like a `thread::Builder::spawn` followed by a `join()`, but avoids the need
 /// for `'static` bounds.