-
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
Update Clippy #110003
Update Clippy #110003
Conversation
It is possible to use conditional compilation to prevent Clippy from evaluating certain code. This adds a brief explanation of how to use the feature with conditional compilation, and mentions that generally it’s preferable to use something like `#[allow(clippy::all)]`. Fixes rust-lang#10220 — Ability to skip files or blocks entirely
Rename method to `is_range_full` because the type is actually `RangeFull`. Method moved to `clippy_utils` for reuse in `clear_with_drain`.
Use `split-debuginfo = "unpacked"` for debug builds On Windows this has no effect as it's unsupported. On macOS the default set by cargo is already unpacked so no effect there either For Linux it shaves a bit off the rebuild time, for me in the case of a simple `touch` + `cargo build` it goes from 12s to 10s It saves a good amount of disk space too, on `aarch64-unknown-linux-gnu` it saves 1.2GB for a plain `cargo build`, 3GB when also running `cargo dev` and `cargo test --no-run -F internal` r? `@flip1995` changelog: none
changelog: fix: Replace the nonexistent `allowed-locales` in the `DISALLOWED_SCRIPT_IDENTS` docs with `allowed-scripts`.
docs fix: unknown field `allowed-locales` changelog: [`DISALLOWED_SCRIPT_IDENTS`]: Replace the nonexistent `allowed-locales` in the docs with `allowed-scripts`.
…ng from float suggest `try_into` when casting to wildcard type; fix [`cast_possible_truncation`] suggesting useless parenthesis; remove suggesting for float to float conversion in [`cast_possible_truncation`] style nit
…tr-casts-parens, r=Jarcho Wrap `transmutes_expressible_as_ptr_casts` suggestions in parentheses changelog: [`transmutes_expressible_as_ptr_casts`]: Fix suggestion missing wrapping parentheses Fixes rust-lang#10449 r? `@Jarcho` Is this the best way to go about this? `unused_parens` will catch the unnecessary ones but emitting them in the first place isn't ideal
Add explanation on how to run `cargo-clippy` and `clippy-driver` I don't know how this would be done on Windows or MacOS, feedback appreciated. I did find this snippet for MacOS but it seems a little sketchy. https://github.com/rust-lang/rust-clippy/blob/1d1e72308e5bcdf5abe95c1d29dfe82524940061/.github/workflows/clippy_bors.yml#L98-L102 changelog: none
fix [`cast_possible_truncation`] offering wrong suggestion for casting float to integer fixes: rust-lang#10366 --- changelog: [`cast_possible_truncation`] Fix incorrect suggestions when casting from float types or to `_`
Make this function work with signed integer types by extracting the underlying type and finding the min and max values. Change the signature to make it more consistent: - The range is now given as an `Expr` in order to extract the type - The container's path is now passed, and only as an `Option` so that the function can be called in the general case without a container
Co-authored-by: llogiq <bogusandre@gmail.com>
Add `max_line_length` to `.editorconfig`, matching `rustfmt.toml` Add `max_line_length` to `.editorconfig` to match the `max_width` in `rustfmt.toml`. changelog: none
[missing_const_for_fn] fix rust-lang#7121 *Please write a short comment explaining your change (or "none" for internal only changes)* changelog: [`missing_const_for_fn`] note about removing const may break compatibility fix rust-lang#7121
…r=xFrednet remove unusued `#![feature(drain_filter)]` The unstable feature does not appear to be used and its presence blocks work in rust-lang#104455 changelog: none
…dnet fix(needless_return): do not trigger on ambiguous match arms return If we see a case where match returns something other than `()`, we just skip `needless_return` lint in that case Should fix rust-lang#10546 Relevant Zulip Discussion: https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/Issue.20.2310546 --- changelog: FP: [`needless_return`]: No longer lints match statements with incompatible branches [rust-lang#10593](rust-lang/rust-clippy#10593) <!-- changelog_checked -->
Clear with drain Fixes rust-lang#10572: both the original intent of the issue (extending `clear_with_drain`) and the false negative for `collection_is_never_read` I found in the process are fixed by this PR. changelog: [`clear_with_drain`]: extend to 5 other types of containers. [`collection_is_never_read`]: fix false negative for `String`s.
…t_type, r=Manishearth `collection_is_never_read`: Handle unit type changelog: [`collection_is_never_read`]: Fix false negative fixes: rust-lang#10488
Links to README.md files must actually be links to index.md files, because of the inner workings of `mdbook`. Also use the latest mdbook version in CI.
Fix links in Clippy book Links to README.md files must actually be links to index.md files, because of the inner workings of `mdbook`. Also use the latest mdbook version in CI. --- Blocks rust-lang#110003 (comment) changelog: none
@Manishearth CI is passing now 🚀 |
@bors r+ |
@bors p=10 |
☀️ Test successful - checks-actions |
Finished benchmarking commit (87a2408): comparison URL. Overall result: ❌ regressions - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
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.
|
r? @Manishearth