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

Implement SourceMap::is_span_accessible #99140

Merged
merged 2 commits into from
Jul 11, 2022

Conversation

TaKO8Ki
Copy link
Member

@TaKO8Ki TaKO8Ki commented Jul 11, 2022

This patch adds SourceMap::is_span_accessible and replaces span_to_snippet(span).is_ok() and span_to_snippet(span).is_err() with it. This removes a &str to String conversion.

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jul 11, 2022
@rust-highfive
Copy link
Contributor

r? @fee1-dead

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 11, 2022
Copy link
Member

@fee1-dead fee1-dead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly I think is_span_accessible would be a better name here. Could you please rename it? Otherwise the changes LGTM.

@TaKO8Ki TaKO8Ki requested a review from fee1-dead July 11, 2022 07:57
Copy link
Member

@fee1-dead fee1-dead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thanks!

@fee1-dead
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Jul 11, 2022

📌 Commit 018155c has been approved by fee1-dead

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 Jul 11, 2022
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Jul 11, 2022
…n, r=fee1-dead

Implement `SourceMap::is_accessible_span`

This patch adds `SourceMap::is_accessible_span` and replaces `span_to_snippet(span).is_ok()` and `span_to_snippet(span).is_err()` with it. This removes a `&str` to `String` conversion.
@klensy
Copy link
Contributor

klensy commented Jul 11, 2022

Title & description not changed.

@TaKO8Ki TaKO8Ki changed the title Implement SourceMap::is_accessible_span Implement SourceMap::is_span_accessible Jul 11, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 11, 2022
Rollup of 5 pull requests

Successful merges:

 - rust-lang#98882 (explain doc comments in macros a bit)
 - rust-lang#98907 (Deny float const params even when `adt_const_params` is enabled)
 - rust-lang#99091 (Do not mention private types from other crates as impl candidates)
 - rust-lang#99140 (Implement `SourceMap::is_span_accessible`)
 - rust-lang#99147 (Mention similarly named associated type even if it's not clearly in supertrait)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 9fc297a into rust-lang:master Jul 11, 2022
@rustbot rustbot added this to the 1.64.0 milestone Jul 11, 2022
@TaKO8Ki TaKO8Ki deleted the implement-is-accessible-span branch July 11, 2022 23:42
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.

6 participants