Auto merge of #78227 - SergioBenitez:test-stdout-threading, r=m-ou-se
Capture output from threads spawned in tests This is revival of #75172. Original text: > Fixes #42474. > > r? `@dtolnay` since you expressed interest in this, but feel free to redirect if you aren't the right person anymore. --- Closes #75172.
This commit is contained in:
commit
56d288fa46
14 changed files with 184 additions and 12 deletions
|
@ -115,6 +115,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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue