diff options
| author | bors <bors@rust-lang.org> | 2020-10-08 22:37:37 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-10-08 22:37:37 +0000 |
| commit | 8a84c4f9c82fbcae8e12201c141518c357d88410 (patch) | |
| tree | af5a86392d5cd688753b6aa264a1d1a01b072993 /compiler | |
| parent | 3525087ada7018ef227b10846648660b7f07b6d1 (diff) | |
| parent | d252848c2e333c674691c37bff978eee073815a5 (diff) | |
| download | rust-8a84c4f9c82fbcae8e12201c141518c357d88410.tar.gz rust-8a84c4f9c82fbcae8e12201c141518c357d88410.zip | |
Auto merge of #77723 - jonas-schievink:rollup-htz44r4, r=jonas-schievink
Rollup of 8 pull requests Successful merges: - #76750 (Don't discourage implementing `core::fmt::Write`) - #77449 (BTreeMap: comment why drain_filter's size_hint is somewhat pessimistic) - #77660 ((docs): make mutex error comment consistent with codebase) - #77663 (Add compile fail test for issue 27675) - #77673 (Remove unnecessary lamda on emitter map.) - #77701 (Make `max_log_info` easily greppable (for figuring out why debug logging is disabled)) - #77702 (Remove not needed lambda.) - #77710 (Update submodule llvm to get LVI bugfix) Failed merges: r? `@ghost`
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_driver/src/lib.rs | 3 | ||||
| -rw-r--r-- | compiler/rustc_interface/src/util.rs | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/compiler/rustc_driver/src/lib.rs b/compiler/rustc_driver/src/lib.rs index 3f50c68e3eb..066a61a7a7b 100644 --- a/compiler/rustc_driver/src/lib.rs +++ b/compiler/rustc_driver/src/lib.rs @@ -155,8 +155,7 @@ pub fn run_compiler( ), } } - let diagnostic_output = - emitter.map(|emitter| DiagnosticOutput::Raw(emitter)).unwrap_or(DiagnosticOutput::Default); + let diagnostic_output = emitter.map_or(DiagnosticOutput::Default, DiagnosticOutput::Raw); let matches = match handle_options(&args) { Some(matches) => matches, None => return Ok(()), diff --git a/compiler/rustc_interface/src/util.rs b/compiler/rustc_interface/src/util.rs index 7ace707cc88..c1b359c7d0d 100644 --- a/compiler/rustc_interface/src/util.rs +++ b/compiler/rustc_interface/src/util.rs @@ -187,7 +187,7 @@ pub fn setup_callbacks_and_run_in_thread_pool_with_globals<F: FnOnce() -> R + Se config = config.stack_size(size); } - let with_pool = move |pool: &rayon::ThreadPool| pool.install(move || f()); + let with_pool = move |pool: &rayon::ThreadPool| pool.install(f); rustc_span::with_session_globals(edition, || { rustc_span::SESSION_GLOBALS.with(|session_globals| { |
