Skip to content

Commit

Permalink
Auto merge of rust-lang#39354 - alexcrichton:less-output, r=steveklabnik
Browse files Browse the repository at this point in the history
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 rust-lang#39327
  • Loading branch information
bors committed Jan 31, 2017
2 parents 0c85f2a + e2ef630 commit cd692cc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/librustdoc/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit cd692cc

Please sign in to comment.