-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Couple of driver cleanups #93936
Merged
Merged
Couple of driver cleanups #93936
Conversation
This file contains 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
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
bjorn3
added
C-cleanup
Category: PRs that clean code up or issues documenting cleanup.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
Feb 12, 2022
rustbot
added
the
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
label
Feb 12, 2022
r? @jackh726 (rust-highfive has picked a reviewer for you, use r? to override) |
rust-highfive
added
the
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
label
Feb 12, 2022
Merged
@bors r+ |
📌 Commit f45ba82 has been approved by |
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Feb 12, 2022
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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C-cleanup
Category: PRs that clean code up or issues documenting cleanup.
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
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.
RustcDefaultCalls
struct, which hasn't been necessary since the introduction ofrustc_interface
.setup_callbacks
call around for a tiny code deduplication.SPAN_DEBUG
global as it isn't actually necessary.