From d0d0e7820806bbb89a2733bae8f9aaa9c78345d0 Mon Sep 17 00:00:00 2001 From: Tyler Mandry Date: Tue, 4 Aug 2020 18:42:36 -0700 Subject: Capture output from threads spawned in tests Fixes #42474. --- compiler/rustc_interface/src/util.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'compiler/rustc_interface') 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 { + Box::new(Self(self.0.clone())) + } +} /// Like a `thread::Builder::spawn` followed by a `join()`, but avoids the need /// for `'static` bounds. -- cgit 1.4.1-3-g733a5