-
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 #76574
Merged
Merged
Update Clippy #76574
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
Update changelog to beta 1.47 [Rendered](https://github.com/ebroto/rust-clippy/blob/changelog_beta_1_47/CHANGELOG.md) changelog: none
…lf awaitable. This catches bugs of the form tokio::spawn(async move { let f = some_async_thing(); f // Oh no I forgot to await f so that work will never complete. });
Syntax-highlight `single_char_push_str` lint It wasn't being syntax highlighted in the online lint index: ![image](https://user-images.githubusercontent.com/37223377/91666682-8fc02000-eab3-11ea-95fa-6671472712c8.png) changelog: none
or_fn_call: ignore nullary associated const fns The fix in rust-lang#5889 was missing associated functions. changelog: Ignore also `const fn` methods in [`or_fun_call`] Fixes rust-lang#5693
Add a lint for an async block/closure that yields a type that is itself awaitable. This catches bugs of the form tokio::spawn(async move { let f = some_async_thing(); f // Oh no I forgot to await f so that work will never complete. }); See the two XXXkhuey comments and the unfixed `_l` structure for things that need more thought. *Please keep the line below* changelog: none
…apsible_if, r=yaahc Fix the wrong suggestion when using macro in `collapsible_if` Fix rust-lang#5962 changelog: Fix the wrong suggestion when using macro in `collapsible_if`
Avoid firing the lint when `transmute` in const contexts as dereferencing raw pointers in consts is unstable. cc rust-lang#5959
Don't emit a lint when the pushed item doesn't have Clone trait
default_trait_access: Fix wrong suggestion rust-lang/rust-clippy#5975 (comment) > I think the underlying problem is clippy suggests code with complete parameters, not clippy triggers this lint even for complex types. AFAIK, If code compiles with `Default::default`, it doesn't need to specify any parameters, as type inference is working. (So, in this case, `default_trait_access` should suggest `RefCell::default`.) Fixes rust-lang#5975 Fixes rust-lang#5990 changelog: `default_trait_access`: fixed wrong suggestion
…in_consts, r=ebroto Fix a fp in `transmute_ptr_to_ptr` fixes rust-lang#5959 changelog: Fix a false positive in `transmute_ptr_to_ptr` that the lint fires when `transmute` is used to cast a reference in const contexts although dereferencing raw pointers in consts is unstable.
Rustup r? `@ghost` changelog: none
…broto Restrict `same_item_push` to suppress false positives It only emits a lint when the pushed item is a literal, a constant and an immutable binding that are initialized with those, as discussed in rust-lang/rust-clippy#5997 (review). Fix rust-lang/rust-clippy#5985 changelog: Restrict `same_item_push` to literals, constants and immutable bindings that are initialized with those. r? `@ebroto`
We no longer lint assignments to const item fields in the `temporary_assignment` lint, since this is now covered by the `CONST_ITEM_MUTATION` lint. Additionally, we `#![allow(const_item_mutation)]` in the `borrow_interior_mutable_const.rs` test. Clippy UI tests are run with `-D warnings`, which seems to cause builtin lints to prevent Clippy lints from running.
…, r=oli-obk Add CONST_ITEM_MUTATION lint Fixes rust-lang#74053 Fixes rust-lang#55721 This PR adds a new lint `CONST_ITEM_MUTATION`. Given an item `const FOO: SomeType = ..`, this lint fires on: * Attempting to write directly to a field (`FOO.field = some_val`) or array entry (`FOO.array_field[0] = val`) * Taking a mutable reference to the `const` item (`&mut FOO`), including through an autoderef `FOO.some_mut_self_method()` The lint message explains that since each use of a constant creates a new temporary, the original `const` item will not be modified.
print the unit type `()` in related lint messages. changelog: print the unit type `()` in related lint messages
Rustup r? `@ghost` changelog: none
link to the Box docs in related lint documentation. changelog: link to the box docs in lint docs
improve the suggestion of the lint `unit-arg` Fixes rust-lang#5823 Fixes rust-lang#6015 Changes ``` help: move the expression in front of the call... | 3 | g(); | help: ...and use a unit literal instead | 3 | o.map_or((), |i| f(i)) | ``` into ``` help: move the expression in front of the call and replace it with the unit literal `()` | 3 | g(); | o.map_or((), |i| f(i)) | ``` changelog: improve the suggestion of the lint `unit-arg`
Add a lint to prevent `create_dir` from being used This closes rust-lang#5950 changelog: none
rust-highfive
added
the
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
label
Sep 10, 2020
@bors r+ |
📌 Commit ca6c695 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
Sep 10, 2020
Do these still get prioritized or did we change that? |
@bors p=1 it's less pressing to prioritize them now that it's using subtree but no harm in doing so anyway |
Makes sense, just wondered. |
☀️ Test successful - checks-actions, checks-azure |
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