-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Update Clippy #98173
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 #98173
Conversation
…t and into_iterator
The fixed issue in this commit can be tested without depending on clap/clap_derive. This updates the test case to do so.
fix(manual_find_map and manual_filter_map): check clone method close rust-lang#8920 Added conditional branching when the clone method is used. Thank you in advance. --- changelog: check `clone()` and other variant preserving methods in [`manual_find_map`] and [`manual_filter_map`]
Remove duplication in creating suggestions by first mapping assignments to spans and then suggestions.
Simplify the creation of suggestions by using `flat_map` instead of `chain`. Note that the order of the suggestions is not important.
Remove the unneeded wrapping and unwrapping in suggestion creation. Collecting to Option<Vec<_>> only returns None if one of the elements is None and that is never the case here.
…r=llogiq improve [`for_loops_over_fallibles`] to detect the usage of iter, iter_mut and into_iterator fix rust-lang#6762 detects code like ```rust for _ in option.iter() { //.. } ``` changelog: Improve [`for_loops_over_fallibles`] to detect `for _ in option.iter() {}` or using `iter_mut()` or `into_iterator()`.
Co-authored-by: Alex <[email protected]>
Co-authored-by: Alex <[email protected]>
Co-authored-by: dswij <[email protected]>
Remove error-pattern comments The `clippy_lints` one [is unused](https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/.60error-pattern.60), the others in `ui-toml` also appear not to have an effect changelog: none
Warn about read into zero-length `Vec` Closes rust-lang#8886 - \[x] Followed [lint naming conventions][lint_naming] - \[x] Added passing UI tests (including committed `.stderr` file) - \[x] `cargo test` passes locally - \[x] Executed `cargo dev update_lints` - \[x] Added lint documentation - \[x] Run `cargo dev fmt` changelog: none
Make `ExprKind::Closure` a struct variant. Simple refactor since we both need it to introduce additional fields in `ExprKind::Closure`. r? ``@Aaron1011``
Fix false positive for `never_loop` struct expression fields Fixes rust-lang#9001. changelog: [`never_loop`]: Now checks for `continue` in struct expression
This is just to ensure that the book builds all time to not get in trouble when syncing with rust-lang/rust
Build mdbook in remark workflow r? `@xFrednet` Supersedes rust-lang#8959 changelog: none
Rustup r? `@ghost` changelog: none
Some changes occurred in src/tools/clippy. cc @rust-lang/clippy |
@bors r+ p=1 rollup=never |
📌 Commit 37cdd7e has been approved by |
☀️ Test successful - checks-actions |
Finished benchmarking commit (3bebee7): comparison url. Instruction count
Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesResults
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression Footnotes |
r? @Manishearth