Skip to content
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

Source map cleanups #109805

Merged
merged 2 commits into from
Mar 31, 2023
Merged

Source map cleanups #109805

merged 2 commits into from
Mar 31, 2023

Conversation

nnethercote
Copy link
Contributor

r? @bjorn3

We can easily pass in the source map.
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.
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 31, 2023
@bjorn3
Copy link
Member

bjorn3 commented Mar 31, 2023

@bors r+

@bors
Copy link
Contributor

bors commented Mar 31, 2023

📌 Commit 4e63ab6 has been approved by bjorn3

It is now in the queue for this repository.

@bors 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 Mar 31, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 31, 2023
…llaumeGomez

Rollup of 7 pull requests

Successful merges:

 - rust-lang#109104 (rustdoc: Fix invalid suggestions on ambiguous intra doc links v2)
 - rust-lang#109443 (Move `doc(primitive)` future incompat warning to `invalid_doc_attributes`)
 - rust-lang#109680 (Fix subslice capture in closure)
 - rust-lang#109798 (fluent_messages macro: don't emit the OS error in a note)
 - rust-lang#109805 (Source map cleanups)
 - rust-lang#109818 (rustdoc: Add GUI test for jump to collapsed item)
 - rust-lang#109820 (rustdoc-search: update docs for comma in `?` help popover)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit d732934 into rust-lang:master Mar 31, 2023
@rustbot rustbot added this to the 1.70.0 milestone Mar 31, 2023
@nnethercote nnethercote deleted the source_map-cleanups branch April 2, 2023 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants