diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-03-29 02:40:56 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-29 02:40:56 +0100 |
| commit | bf3e6c63d6b1a6efec0a65e22fbe9b9013d2705e (patch) | |
| tree | f64e80235a75d0670f37b5502813a25ecff5d678 /src | |
| parent | 73f9832ee46a84ad25320224fd5685f4c140c06d (diff) | |
| parent | e9a8befd2d4c0e19a9ec85cc047ef335a2b8b943 (diff) | |
| download | rust-bf3e6c63d6b1a6efec0a65e22fbe9b9013d2705e.tar.gz rust-bf3e6c63d6b1a6efec0a65e22fbe9b9013d2705e.zip | |
Rollup merge of #59496 - Zoxc:fix-globals, r=oli-obk
Remove unnecessary with_globals calls
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc_interface/interface.rs | 14 | ||||
| -rw-r--r-- | src/librustdoc/lib.rs | 4 |
2 files changed, 8 insertions, 10 deletions
diff --git a/src/librustc_interface/interface.rs b/src/librustc_interface/interface.rs index bec868be505..245a2bf92d5 100644 --- a/src/librustc_interface/interface.rs +++ b/src/librustc_interface/interface.rs @@ -136,14 +136,12 @@ where F: FnOnce(&Compiler) -> R + Send, R: Send, { - syntax::with_globals(move || { - let stderr = config.stderr.take(); - util::spawn_thread_pool( - config.opts.debugging_opts.threads, - &stderr, - || run_compiler_in_existing_thread_pool(config, f), - ) - }) + let stderr = config.stderr.take(); + util::spawn_thread_pool( + config.opts.debugging_opts.threads, + &stderr, + || run_compiler_in_existing_thread_pool(config, f), + ) } pub fn default_thread_pool<F, R>(f: F) -> R diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs index fccf5a67ad4..2ebb465d53d 100644 --- a/src/librustdoc/lib.rs +++ b/src/librustdoc/lib.rs @@ -443,7 +443,7 @@ where R: 'static + Send, let (tx, rx) = channel(); - let result = rustc_driver::report_ices_to_stderr_if_any(move || syntax::with_globals(move || { + let result = rustc_driver::report_ices_to_stderr_if_any(move || { let crate_name = options.crate_name.clone(); let crate_version = options.crate_version.clone(); let (mut krate, renderinfo, renderopts, passes) = core::run_core(options); @@ -462,7 +462,7 @@ where R: 'static + Send, renderopts, passes: passes })).unwrap(); - })); + }); match result { Ok(()) => rx.recv().unwrap(), |
