-
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
Improve non_fmt_panic lint. #82113
Merged
Merged
Improve non_fmt_panic lint. #82113
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
Before this change, the suggestion was `std::panic::panic_any(123]`, changing the opening brace but not the closing one.
m-ou-se
added
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
D-confusing
Diagnostics: Confusing error or lint that should be reworked.
D-incorrect
Diagnostics: A diagnostic that is giving misleading or incorrect information.
labels
Feb 14, 2021
rust-highfive
added
the
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
label
Feb 14, 2021
This comment has been minimized.
This comment has been minimized.
Note: Applying the multipart suggestions automatically with |
jyn514
reviewed
Feb 14, 2021
@bors r+ |
📌 Commit ad93f48 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 23, 2021
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 23, 2021
Rollup of 10 pull requests Successful merges: - rust-lang#81629 (Point out implicit deref coercions in borrow) - rust-lang#82113 (Improve non_fmt_panic lint.) - rust-lang#82258 (Implement -Z hir-stats for nested foreign items) - rust-lang#82296 (Support `pub` on `macro_rules`) - rust-lang#82297 (Consider auto derefs before warning about write only fields) - rust-lang#82305 (Remove many RefCells from DocContext) - rust-lang#82308 (Lower condition of `if` expression before it's "then" block) - rust-lang#82311 (Jsondocck improvements) - rust-lang#82362 (Fix mir-cfg dumps) - rust-lang#82391 (disable atomic_max/min tests in Miri) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
jyn514
reviewed
Mar 5, 2021
(arg_span.until(open.shrink_to_hi()), "".into()), | ||
(close.until(arg_span.shrink_to_hi()), "".into()), | ||
], | ||
Applicability::MachineApplicable, |
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.
Unfortunately, this doesn't actually work due to a bug in cargo: rust-lang/rustfix#141
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
D-confusing
Diagnostics: Confusing error or lint that should be reworked.
D-incorrect
Diagnostics: A diagnostic that is giving misleading or incorrect information.
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 change:
panic!(a!())
);panic!(format!(..))
to removeformat!()
instead of adding"{}",
or usingpanic_any
like it does now; andpanic![123]
bypanic_any(123]
.Fixes #82109.
Fixes #82110.
Fixes #82111.
Example output:
r? @estebank