-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Detect fake spans in non_fmt_panic lint. #87967
Merged
bors
merged 1 commit into
rust-lang:master
from
m-ou-se:non-fmt-panic-detect-fake-spans
Aug 17, 2021
Merged
Detect fake spans in non_fmt_panic lint. #87967
bors
merged 1 commit into
rust-lang:master
from
m-ou-se:non-fmt-panic-detect-fake-spans
Aug 17, 2021
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
r? @cjgillot (rust-highfive has picked a reviewer for you, use r? to override) |
@bors r+ rollup |
📌 Commit 079bf75 has been approved by |
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this pull request
Aug 15, 2021
…pans, r=cjgillot Detect fake spans in non_fmt_panic lint. This addresses rust-lang#87621 Some proc_macros claim that the user wrote all of the tokens it outputs, by applying a span from the input to all of the produced tokens. That can result in confusing suggestions, as in rust-lang#87621. This is a simple patch that avoids suggesting anything for `panic!("{}")` if the span of `"{}"` and `panic!(..)` are identical, which is normally not possible.
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this pull request
Aug 15, 2021
…pans, r=cjgillot Detect fake spans in non_fmt_panic lint. This addresses rust-lang#87621 Some proc_macros claim that the user wrote all of the tokens it outputs, by applying a span from the input to all of the produced tokens. That can result in confusing suggestions, as in rust-lang#87621. This is a simple patch that avoids suggesting anything for `panic!("{}")` if the span of `"{}"` and `panic!(..)` are identical, which is normally not possible.
This was referenced Aug 15, 2021
camsteffen
added a commit
to camsteffen/rust
that referenced
this pull request
Aug 15, 2021
…pans, r=cjgillot Detect fake spans in non_fmt_panic lint. This addresses rust-lang#87621 Some proc_macros claim that the user wrote all of the tokens it outputs, by applying a span from the input to all of the produced tokens. That can result in confusing suggestions, as in rust-lang#87621. This is a simple patch that avoids suggesting anything for `panic!("{}")` if the span of `"{}"` and `panic!(..)` are identical, which is normally not possible.
m-ou-se
added a commit
to m-ou-se/rust
that referenced
this pull request
Aug 16, 2021
…pans, r=cjgillot Detect fake spans in non_fmt_panic lint. This addresses rust-lang#87621 Some proc_macros claim that the user wrote all of the tokens it outputs, by applying a span from the input to all of the produced tokens. That can result in confusing suggestions, as in rust-lang#87621. This is a simple patch that avoids suggesting anything for `panic!("{}")` if the span of `"{}"` and `panic!(..)` are identical, which is normally not possible.
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Aug 16, 2021
Rollup of 10 pull requests Successful merges: - rust-lang#87178 ([rustdoc] Copy only item path to clipboard rather than full `use` statement.) - rust-lang#87677 (Adding explicit notice of lack of documentation for Tier 2 Platforms) - rust-lang#87958 (Closure migration multispan suggestions) - rust-lang#87967 (Detect fake spans in non_fmt_panic lint.) - rust-lang#88011 (Enable `--all-targets` for `x.py check` unconditionally) - rust-lang#88030 (Assign FIXMEs to me and remove obsolete ones) - rust-lang#88052 (Update redox_syscall) - rust-lang#88055 (Update RELEASES.md for 1.55.0) - rust-lang#88080 (Skip assert ICE with default_method_body_is_const) - rust-lang#88089 (Rustdoc font test) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
D-papercut
Diagnostics: An error or lint that needs small tweaks.
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.
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.
This addresses #87621
Some proc_macros claim that the user wrote all of the tokens it outputs, by applying a span from the input to all of the produced tokens. That can result in confusing suggestions, as in #87621. This is a simple patch that avoids suggesting anything for
panic!("{}")
if the span of"{}"
andpanic!(..)
are identical, which is normally not possible.