-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Update clippy #102106
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 #102106
Conversation
A u128 has an 8 byte alignment on x86, but a 16 byte alignment on aarch64 which changes the size of the enums due to extra padding
…anishearth Replace u128 with u64 in large_enum_variant uitest A u128 has [an 8 byte alignment on x86](rust-lang#54341), but a 16 byte alignment on aarch64 which changes the size of the enums due to extra padding. This means the test fails on aarch64 changelog: none
fix `implements_trait` and `in_external_macro` import path Remove example using `match_trait_method` since its deprecated
[`assertions_on_result_states`]: Fix suggestion when `assert!` is not in a statement. fix rust-lang/rust-clippy#9450 changelog: [`assertions_on_result_states`]: Fix suggestion when `assert!` is not in a statement.
Do not expand macro in `nonminimal_bool` suggestions fix rust-lang/rust-clippy#9428 changelog: Do not expand macros in [`nonminimal_bool`] suggestions
Use macro callsite when creating `Sugg` helper Closes rust-lang#9375 changelog: Improvement: [`collapsible_if`]: Suggestions now work with macros, by taking the call site into account.
Use `visit_expr_field` for `ParamPosition` A small change to make it a little simpler changelog: none
Fix FormatArgsExpn parsing of FormatSpec positions Woops, forgot visitors don't walk themselves Fixes rust-lang#9468 r? `@giraffate` changelog: none
Don't lint `large_stack_array` inside static items We now check if the linted `Expr` is inside an `ItemKind::Static`, which can't take the suggested `Box<[...]`. I _think_ this is the correct fix for rust-lang#9460 I removed `if_chain` while I was at it. changelog: Don't lint `large_stack_array` inside static items
Don't panic on invalid shift while constfolding Instead of panicking on invalid shifts while folding constants we simply give up. Fixes rust-lang#9463 Notice the "attempt to shift right by `1316134912_u32`", which seems weird. AFAICS it comes from rustc itself. changelog: none
Fix dev book fix `implements_trait` and `in_external_macro` import path Remove example using `match_trait_method` since its deprecated. changelog: none
Do not lint `use_self` in proc macro expansion fix rust-lang/rust-clippy#9440 fix rust-lang/rust-clippy#8910 fix rust-lang/rust-clippy#6902 changelog: [`use_self`]: Do not lint in proc macro expansion
Make `derivable_impls` machine applicable changelog: [`derivable_impls`]: Now machine applicable
Fix indents Markdowns are not displayed correctly. https://github.com/rust-lang/rust-clippy/blob/master/book/src/development/common_tools_writing_lints.md#dealing-with-macros-and-expansions changelog: none
…dnet Add `iter_kv_map` lint fixes rust-lang#9376 | before | after | | -------------- | ------------------------- | | `hmap.iter().map(\|(key, _)\| key)` | `hmap.keys()` | | `hmap.iter().map(\|(_, v)\| v + 2)` | `hmap.values().map(\|v\| v + 2)` | | `hmap.into_iter().map(\|(key, _)\| key)` | `hmap.into_keys()` | Is `MachineApplicable` changelog: [`iter_kv_map`]: added lint
Add `#[allow(unused)]` to test in `cargo dev new_lint` `rustfix` tests don't automatically apply `-Aunused` which leads to some tests having `_workarounds`, add it to new test files automatically so people don't have to worry about it changelog: none
[arithmetic-side-effects] Finish non-overflowing ops Extends rust-lang/rust-clippy#9474 to also take into consideration "raw" binary operations. For example, `let a = b / 2` and `let a = 1 * b` won't trigger the lint. changelog: [arithmetic-side-effects] Finish non-overflowing ops
[arithmetic-side-effects] Add more tests Taken from the `integer-arithmetic` lint. changelog: [arithmetic-side-effects] Add more tests
Fixes rust-lang#9504 Compiler generated call `into_iter` nodes return empty substs which we need when checking it's predicates. Handle this by simply exitting when we encounter one. This change introduces false negatives in place of the ICEs.
Fix ICE in `unnecessary_to_owned` Fixes rust-lang#9504 Compiler generated call `into_future` nodes return empty substs which we need when checking it's predicates. Handle this by simply exitting when we encounter one. This change introduces false negatives in place of the ICEs. changelog: [`unnecessary_to_owned`]: fix ICE
Add matches! checking to nonstandard_macro_braces changelog: Enhancement: [`nonstandard_macro_braces`]: Now includes `matches!()` in the default lint config [rust-lang#9471](rust-lang/rust-clippy#9471)
Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
19ca857
to
0650c40
Compare
@bors r+ p=1 |
☀️ Test successful - checks-actions |
Finished benchmarking commit (4a4fd12): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Footnotes |
r? @Manishearth