about summary refs log tree commit diff
path: root/book
AgeCommit message (Collapse)AuthorLines
2025-02-21rename `MANUAL_DIV_CEIL` MSRV alias and add missing conf info for ↵Alejandra González-0/+1
`manual_div_ceil` (#14263) - The name of an MSRV alias should describe its functionality, and it is not appropriate for it to be the same as the name of the lint that uses it. - Additionally, while `manual_div_ceil` allows setting MSRV, this is not correctly reflected in the configuration information. changelog: none
2025-02-20add missing MSRV configuration information for `manual_div_ceil`lapla-cogito-0/+1
2025-02-19add `owned_cow` lintAndre Bogus-0/+1
2025-02-19update `rustfix` linklapla-cogito-2/+2
2025-02-13fix broken link of UI test in the book (#14077)Philipp Krones-1/+1
r? flip1995 changelog: none
2025-02-12New lint: `mem_replace_option_with_some` (#14197)llogiq-0/+1
`mem::replace(opt, Some(v))` can be replaced by `opt.replace(v)`. Close #14195 changelog: [`mem_replace_option_with_some`]: new lint
2025-02-12New lint: `mem_replace_option_with_some`Samuel Tardieu-0/+1
`mem::replace(opt, Some(v))` can be replaced by `opt.replace(v)`.
2025-02-11`{expect,unwrap}_used`: add options to lint at compilation timeSamuel Tardieu-0/+20
By default, do not lint `.unwrap()` and `.expect(…)` in always const contexts, as a failure would be detected at compile time anyway. New options `allow_expect_in_consts` and `allow_unwrap_in_consts`, defaulting to `true`, can be turned unset to still lint in always const contexts.
2025-02-10correct "Affected lints" for `allow-one-hash-in-raw-strings`lapla-cogito-1/+1
2025-02-08add MSRV check for `manual_flatten` (#14086)dswij-0/+1
`manual_flatten` should respect MSRV. changelog: [`manual_flatten`]: add MSRV check
2025-02-07add `manual_option_as_slice` MSRV to the lint documentation (#14171)Catherine Flores-0/+1
`manual_option_as_slice` takes MSRV into account, but this is not mentioned in the lint documentation. changelog: none
2025-02-07add MSRV check for `lines_filter_map_ok` (#14130)Catherine Flores-0/+1
fixes #14127 changelog: [`lines_filter_map_ok`]: respect MSRV
2025-02-07add `manual_option_as_slice` to the lint documentationlapla-cogito-0/+1
2025-02-06Merge remote-tracking branch 'upstream/master' into rustupPhilipp Krones-1/+15
2025-02-06Fix docs for `#[clippy::format_args]` (#14161)Philipp Krones-1/+1
changelog: none
2025-02-06Add Nursery and Deprecated groups section at Book (#13926)Philipp Krones-0/+13
[RFC](https://github.com/rust-lang/rfcs/blob/master/text/2476-clippy-uno.md#lint-audit-and-categories) has more groups so add them changelog: none
2025-02-06Fix docs for `#[clippy::format_args]`Yuri Astrakhan-1/+1
2025-02-05Add Nursery and Deprecated lints section at BookAlexey Semenyuk-0/+13
2025-02-03add `manual_slice_fill` lint (#14082)llogiq-0/+1
close #13856 changelog: [`manual_slice_fill`]: new lint
2025-02-03add `manual_slice_fill` lintlapla-cogito-0/+1
2025-02-02Convert two `rustc_middle::lint` functions to `Span` methods.Nicholas Nethercote-8/+6
`rustc_middle` is a huge crate and it's always good to move stuff out of it. There are lots of similar methods already on `Span`, so these two functions, `in_external_macro` and `is_from_async_await`, fit right in. The diff is big because `in_external_macro` is used a lot by clippy lints.
2025-02-01add MSRV check for `lines_filter_map_ok`lapla-cogito-0/+1
2025-01-28Merge commit '51d49c1ae2785b24ef18a46ef233fc1d91844666' into ↵Philipp Krones-13/+17
clippy-subtree-update
2025-01-28Merge remote-tracking branch 'upstream/master' into rustupPhilipp Krones-13/+17
2025-01-27add MSRV check for `manual_flatten`lapla-cogito-0/+1
2025-01-27fixed a missing description of the MSRV option for `manual_repeat_n`lapla-cogito-0/+1
2025-01-26remove `clippy::double_neg`Kalle Wachsmuth-5/+4
2025-01-26fix broken link of UI test in the booklapla-cogito-1/+1
2025-01-24add new lint `non_std_lazy_statics`J-ZhengLi-0/+1
detect usage of `once_cell::sync::Lazy` and `lazy_static!`, recommending usage of `std::sync::LazyLock` instead
2025-01-22Suggest using `Vec::extend()` in `same_item_push` (#13987)Fridtjof Stoldt-0/+1
Using `Vec::extend(std::iter::repeat_n(item, N))` allows to use the more natural number of elements to add `N`, as is probably done in the original loop, instead of computing the difference between the existing number of elements and the wanted one. Before MSRV 1.82, the older suggestion to use `Vec::resize()` is still issued. Inspired by #6156 (which predates `repeat_n()`). changelog: [`same_item_push`]: recommend using `Vec::extend()` to extend a vector
2025-01-15Suggest using `Vec::extend()` in `same_item_push`Samuel Tardieu-0/+1
Using `Vec::extend(std::iter::repeat_n(item, N))` allows to use the more natural number of elements to add `N`, as is probably done in the original loop, instead of computing the difference between the existing number of elements and the wanted one. Before MSRV 1.82, the older suggestion to use `Vec::resize()` is still issued.
2025-01-13Select Rust edition 2024 for compiling Clippy (#13751)Philipp Krones-3/+3
The Cargo feature is no longer experimental and is enabled by default in our nightly compiler. changelog: Clippy now uses Rust edition 2024
2025-01-13Select edition 2024Samuel Tardieu-3/+3
2025-01-13fix(adding_lints): usage of early vs late lint pass (#13955)Philipp Krones-4/+5
changelog: none This PR fixes explaining the difference in usage between early and late lint passes in the book.
2025-01-13Fix link to release tags (#13930)Philipp Krones-2/+2
Since we do release tag it makes more sense to refer to tags page then empty releases page changelog: none
2025-01-13Fix not found links at Book (#13935)Philipp Krones-2/+2
Some of the links are wrong since lead to non existing docs so fix them changelog: none
2025-01-09Merge commit '19e305bb57a7595f2a8d81f521c0dd8bf854e739' into ↵Philipp Krones-1/+33
clippy-subtree-update
2025-01-07define_clippy_lints does not exist, declare_clippy_lints existslapla-cogito-2/+2
2025-01-06Update adding_lints.mdAaron Ang-4/+5
2025-01-06fix(adding_lints): usage of early vs late lint passAaron Ang-2/+2
2025-01-03Changelog for Clippy 1.84 :firecracker:xFrednet-0/+5
2025-01-03Fix not found links at Bookalexey semenyuk-2/+2
2025-01-02Fix link to release tagsalexey semenyuk-2/+2
2024-12-28fix arguments of `ExprKind::MethodCall` (#13890)Philipp Krones-1/+1
changelog: none
2024-12-28fix arguments of ExprKind::MethodCalllapla-cogito-1/+1
2024-12-27Make `inconsistent_struct_constructor` "all fields are shorthand" ↵Timo-0/+27
requirement configurable (#13737) Fixes #11846. This PR has three commits: - The first commit adds an `initializer-suggestions` configuration to control suggestion applicability when initializers are present. The following are the options: - "none": do not suggest - "maybe-incorrect": suggest, but do not apply suggestions with `--fix` - "machine-applicable": suggest and apply suggestions with `--fix` - The second commit fixes suggestions to handle field attributes (problem [noticed by @samueltardieu](https://github.com/rust-lang/rust-clippy/pull/13737#discussion_r1859261645)). - The third commit adds `initializer-suggestions = "machine-applicable"` to Clippy's `clippy.toml` and applies the suggestions. (Nothing seems to break.) --- changelog: make `inconsistent_struct_constructor` "all fields are shorthand" requirement configurable
2024-12-26Make "all fields are shorthand" requirement configurableSamuel Moelius-0/+27
Handle field attributes in suggestions Fix adjacent code Address review comments https://github.com/rust-lang/rust-clippy/pull/13737#discussion_r1861352124 Address all review comments but one This comment is not yet addressed: https://github.com/rust-lang/rust-clippy/pull/13737#discussion_r1874544907 `initializer_suggestions` -> `lint_inconsistent_struct_field_initializers`
2024-12-26Merge commit '609cd310be44677ae31d452a17b0f8207e1abfe1' into ↵Philipp Krones-136/+175
clippy-subtree-update
2024-12-25fix examples using Ty.kind()lapla-cogito-2/+2
2024-12-19Add allow-indexing-slicing-in-tests option (#13854)llogiq-0/+10
Close #13842 changelog: [`indexing_slicing`]: add allow-indexing-slicing-in-tests option to be able ignore at test