-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Update Clippy #86782
Merged
Merged
Update Clippy #86782
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
Producing a good suggestion for this lint is already hard when no macros are involved. With macros the lint message and the suggestion are just confusing. Since both, producing a good suggestion and figuring out if this pattern can be re-written inside a macro is nearly impossible, just bail out.
Backport of rust-lang#7170 to beta r? `@ghost` changelog: none (fixes stack overflow, but this was introduced in this release cycle) Now actually opened towards the `beta` branch.
This reverts commit 716d03f. This is no longer necessary, since rustup 1.24.2 is now the default version on the windows runner.
Revert "CI: update rustup before installing the toolchain on windows" This reverts commit 716d03f. This is no longer necessary, since rustup 1.24.2 is now the default version on the windows runner. changelog: none
Don't warn about `cfg!(..)` as a constant in assertions This makes clippy understand that `cfg!(..)` is not just a hardcoded `true` or `false` (even though it expands to one of those). cc `@khyperia` changelog: Don't treat `cfg!(..)` as a constant in [`assertions-on-constants`]
…Manishearth Fix needless_collect with binding shadowing changelog: Fix [`needless_collect`] weird output when a binding is shadowed Fixes rust-lang#7200
…xFrednet Release doc: add explanation for updating the stable branch r? `@xFrednet` [Rendered](https://github.com/flip1995/rust-clippy/blob/doc-release-stable-branch/doc/release.md) changelog: none
These macros have already been removed, but there was still some code handling these macros. That code is now removed.
Fix FP in `default_numeric_fallback` with external macro expansion fixes rust-lang#7304 changelog: Fix `default_numeric_fallback` FP with external macro expansion
…rednet,flip1995 fix `while_let_on_iterator` suggestion in a closure fixes: rust-lang#7249 A future improvement would be to check if the closure is being used as `FnOnce`, in which case the original suggestion would be correct. changelog: Suggest `&mut iter` inside a closure for `while_let_on_iterator`
Simplify use_self impl changelog: none Mainly to remove an extra visit and simplify the "in body?" logic.
Improve lint message for match-same-arms lint fixes rust-lang#7331 Follow-up to rust-lang#7377 This PR improves the lint message for `match-same-arms` lint and adds `todo!(..)` example to the lint docs. *Please write a short comment explaining your change (or "none" for internal only changes)* changelog: None
New lint: `disallowed_script_idents` This PR implements a new lint to restrict locales that can be used in the code, as proposed in rust-lang#7376. Current concerns / unresolved questions: - ~~Mixed usage of `script` (as a Unicode term) and `locale` (as something that is easier to understand for the broad audience). I'm not sure whether these terms are fully interchangeable and whether in the current form it is more confusing than helpful.~~ `script` is now used everywhere. - ~~Having to mostly copy-paste `AllowedScript`. Probably it's not a big problem, as the list of scripts is standardized and is unlikely to change, and even if we'd stick to the `unicode_script::Script`, we'll still have to implement custom deserialization, and I don't think that it will be shorter in terms of the amount of LoC.~~ `unicode::Script` is used together with a filtering deserialize function. - Should we stick to the list of "recommended scripts" from [UAX rust-lang#31](http://www.unicode.org/reports/tr31/#Table_Recommended_Scripts) in the configuration? *Please write a short comment explaining your change (or "none" for internal only changes)* changelog: ``[`disallowed_script_idents`]`` r? `@Manishearth`
This fixes a bug where match_wildcard_for_single_variants produced a bad suggestion where besides the missing variant, one or more hidden variants were left. This also adds tests to the ui-tests match_wildcard_for_single_variants and wildcard_enum_match_arm to make sure that the correct suggestion is produced.
Don't suggest doc(hidden) or unstable variants in wildcard lint Clippy's wildcard lint would suggest doc(hidden) and unstable variants for non_exhaustive enums, even though those aren't part of the public interface (yet) and should only be matched on using a `_`, just like potential future additions to the enum. There was already some logic to exclude a *single* doc(hidden) variant. This extends that to all hidden variants, and also hides `#[unstable]` variants. See rust-lang#85746 (comment) This PR includes rust-lang/rust-clippy#7406 as the first commit. Here's the diff that this PR adds on top of that PR: m-ou-se/fork@std-errorkind...m-ou-se:doc-hidden-variants --- *Please write a short comment explaining your change (or "none" for internal only changes)* changelog: No longer suggest unstable and doc(hidden) variants in wildcard lint. wildcard_enum_match_arm, match_wildcard_for_single_variants
Rustup r? `@ghost` changelog: none
Some changes occurred in src/tools/clippy. cc @rust-lang/clippy |
rust-highfive
added
the
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
label
Jul 1, 2021
@bors r+ |
📌 Commit 44cea51 has been approved by |
@bors rollup=iffy (includes Cargo.lock update) |
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 1, 2021
☀️ Test successful - checks-actions |
flip1995
pushed a commit
to flip1995/rust
that referenced
this pull request
Jul 15, 2021
Update Clippy Biweekly Clippy Update r? `@Manishearth`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
merged-by-bors
This PR was explicitly merged by bors.
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
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.
Biweekly Clippy Update
r? @Manishearth