Merge set_panic and set_print into set_output_capture.

There were no use cases for setting them separately.
Merging them simplifies some things.
This commit is contained in:
Mara Bos 2020-11-04 00:11:14 +01:00
parent 08b7cb79e0
commit aff7bd66e8
13 changed files with 57 additions and 131 deletions

View file

@ -148,7 +148,7 @@ pub fn setup_callbacks_and_run_in_thread_pool_with_globals<F: FnOnce() -> R + Se
let main_handler = move || {
rustc_span::with_session_globals(edition, || {
io::set_panic(stderr.clone());
io::set_output_capture(stderr.clone());
f()
})
};
@ -186,7 +186,7 @@ pub fn setup_callbacks_and_run_in_thread_pool_with_globals<F: FnOnce() -> R + Se
// on the new threads.
let main_handler = move |thread: rayon::ThreadBuilder| {
rustc_span::SESSION_GLOBALS.set(session_globals, || {
io::set_panic(stderr.clone());
io::set_output_capture(stderr.clone());
thread.run()
})
};