diff options
| author | Mara Bos <m-ou.se@m-ou.se> | 2020-11-04 00:11:14 +0100 |
|---|---|---|
| committer | Mara Bos <m-ou.se@m-ou.se> | 2020-11-10 21:58:13 +0100 |
| commit | aff7bd66e8b97a41d34c221007e12e4bbe535322 (patch) | |
| tree | 546732fa39141338be1e546634a3815f50272d4a /compiler/rustc_interface/src | |
| parent | 08b7cb79e0d76aab4d3a68335595c07b238c17b8 (diff) | |
| download | rust-aff7bd66e8b97a41d34c221007e12e4bbe535322.tar.gz rust-aff7bd66e8b97a41d34c221007e12e4bbe535322.zip | |
Merge set_panic and set_print into set_output_capture.
There were no use cases for setting them separately. Merging them simplifies some things.
Diffstat (limited to 'compiler/rustc_interface/src')
| -rw-r--r-- | compiler/rustc_interface/src/lib.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_interface/src/util.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_interface/src/lib.rs b/compiler/rustc_interface/src/lib.rs index 88d2efe96d1..0935eb2bd71 100644 --- a/compiler/rustc_interface/src/lib.rs +++ b/compiler/rustc_interface/src/lib.rs @@ -1,6 +1,6 @@ #![feature(bool_to_option)] #![feature(box_syntax)] -#![feature(set_stdio)] +#![feature(internal_output_capture)] #![feature(nll)] #![feature(generator_trait)] #![feature(generators)] diff --git a/compiler/rustc_interface/src/util.rs b/compiler/rustc_interface/src/util.rs index 94a7a5ba793..20a7b47313e 100644 --- a/compiler/rustc_interface/src/util.rs +++ b/compiler/rustc_interface/src/util.rs @@ -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() }) }; |
