From e2ef630a21ae7439477642c7b629cd9beaa1811e Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 27 Jan 2017 14:51:47 -0800 Subject: [PATCH] rustdoc: Suppress warnings/errors with --test Threads spawned by the test framework have their output captured by default, so for `rustdoc --test` threads this propagates that capturing to the spawned thread that we now have. Closes #39327 --- src/librustdoc/test.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/librustdoc/test.rs b/src/librustdoc/test.rs index 1f224cac9e91f..ab0ac02fd88f1 100644 --- a/src/librustdoc/test.rs +++ b/src/librustdoc/test.rs @@ -429,8 +429,12 @@ impl Collector { should_panic: testing::ShouldPanic::No, }, testfn: testing::DynTestFn(box move |()| { + let panic = io::set_panic(None); + let print = io::set_print(None); match { rustc_driver::in_rustc_thread(move || { + io::set_panic(panic); + io::set_print(print); runtest(&test, &cratename, cfgs,