-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Conversation
r? @fee1-dead (rust-highfive has picked a reviewer for you, use r? to override) |
There was a problem hiding this 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, Thanks!
@bors r+ |
…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.
Title & description not changed. |
SourceMap::is_accessible_span
SourceMap::is_span_accessible
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
This patch adds
SourceMap::is_span_accessible
and replacesspan_to_snippet(span).is_ok()
andspan_to_snippet(span).is_err()
with it. This removes a&str
toString
conversion.