Skip to content

Commit e9a8bef

Browse files
committed
Remove unnecessary with_globals calls
1 parent 237bf32 commit e9a8bef

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

src/librustc_interface/interface.rs

+6-8
Original file line numberDiff line numberDiff line change
@@ -136,14 +136,12 @@ where
136136
F: FnOnce(&Compiler) -> R + Send,
137137
R: Send,
138138
{
139-
syntax::with_globals(move || {
140-
let stderr = config.stderr.take();
141-
util::spawn_thread_pool(
142-
config.opts.debugging_opts.threads,
143-
&stderr,
144-
|| run_compiler_in_existing_thread_pool(config, f),
145-
)
146-
})
139+
let stderr = config.stderr.take();
140+
util::spawn_thread_pool(
141+
config.opts.debugging_opts.threads,
142+
&stderr,
143+
|| run_compiler_in_existing_thread_pool(config, f),
144+
)
147145
}
148146

149147
pub fn default_thread_pool<F, R>(f: F) -> R

src/librustdoc/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ where R: 'static + Send,
443443

444444
let (tx, rx) = channel();
445445

446-
let result = rustc_driver::report_ices_to_stderr_if_any(move || syntax::with_globals(move || {
446+
let result = rustc_driver::report_ices_to_stderr_if_any(move || {
447447
let crate_name = options.crate_name.clone();
448448
let crate_version = options.crate_version.clone();
449449
let (mut krate, renderinfo, renderopts, passes) = core::run_core(options);
@@ -462,7 +462,7 @@ where R: 'static + Send,
462462
renderopts,
463463
passes: passes
464464
})).unwrap();
465-
}));
465+
});
466466

467467
match result {
468468
Ok(()) => rx.recv().unwrap(),

0 commit comments

Comments
 (0)