Merged
Conversation
It is a leftover from before the introduction of rustc_interface
This ensures that it is called even when run_in_thread_pool_with_globals is avoided and reduces code duplication between the parallel and non-parallel version of run_in_thread_pool_with_globals
The only difference between the default and rustc_interface set version is that the default accesses the source map from SESSION_GLOBALS while the rustc_interface version accesses the source map from the global TyCtxt. SESSION_GLOBALS is always set while running the compiler while the global TyCtxt is not always set. If the global TyCtxt is set, it's source map is identical to the one in SESSION_GLOBALS
Contributor
|
r? @jackh726 (rust-highfive has picked a reviewer for you, use r? to override) |
Merged
Contributor
|
@bors r+ |
Collaborator
|
📌 Commit f45ba82 has been approved by |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 13, 2022
…askrgr Rollup of 9 pull requests Successful merges: - rust-lang#89926 (make `Instant::{duration_since, elapsed, sub}` saturating and remove workarounds) - rust-lang#90532 (More informative error message for E0015) - rust-lang#93810 (Improve chalk integration) - rust-lang#93851 (More practical examples for `Option::and_then` & `Result::and_then`) - rust-lang#93885 (bootstrap.py: Suggest disabling download-ci-llvm option if url fails to download) - rust-lang#93886 (Stabilise inherent_ascii_escape (FCP in rust-lang#77174)) - rust-lang#93930 (add link to format_args! when mention it in docs) - rust-lang#93936 (Couple of driver cleanups) - rust-lang#93944 (Don't relabel to a team if there is already a team label) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 14, 2022
Remove Config::stderr 1. It captured stdout and not stderr 2. It isn't used anywhere 3. All error messages should go to the DiagnosticOutput instead 4. It modifies thread local state Marking as blocked as it will conflict a bit with rust-lang#93936.
nnethercote
added a commit
to nnethercote/rust
that referenced
this pull request
Mar 31, 2023
Rename `with_source_map` as `set_source_map`. Because `with` functions (e.g. `with_session_globals`, `scoped_tls::ScopedKey::with`) are for *getting* a value for the duration of a closure, and `set` functions (e.g. `set_session_globals_then` `scoped_tls::ScopedKey::with`) are for *setting* a value for the duration of a closure. Also fix up the comment, which is wrong: - The bit about `TyCtxt` is wrong. - `span_debug1` doesn't exist any more. - There's only one level of fallback, not two. (This is effectively a follow-up to the changes in rust-lang#93936.) Also add a comment explaining that `SessionGlobals::source_map` should only be used when absolutely necessary.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RustcDefaultCallsstruct, which hasn't been necessary since the introduction ofrustc_interface.setup_callbackscall around for a tiny code deduplication.SPAN_DEBUGglobal as it isn't actually necessary.