Skip to content

Commit 49263b1

Browse files
authored
Merge branch 'master' into ignored_result_err
2 parents 6683945 + 39df31c commit 49263b1

188 files changed

Lines changed: 3748 additions & 1829 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ serde = { version = "1.0.145", features = ["derive"] }
4040
serde_json = "1.0.122"
4141
walkdir = "2.3"
4242
filetime = "0.2.9"
43-
itertools = "0.12"
43+
itertools = "0.15"
4444
pulldown-cmark = { version = "0.11", default-features = false, features = ["html"] }
4545
askama = { version = "0.16.0", default-features = false, features = ["alloc", "config", "derive"] }
4646

book/src/development/adding_lints.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -447,8 +447,8 @@ Sometimes a lint makes suggestions that require a certain version of Rust. For
447447
example, the `manual_strip` lint suggests using `str::strip_prefix` and
448448
`str::strip_suffix` which is only available after Rust 1.45. In such cases, you
449449
need to ensure that the MSRV configured for the project is >= the MSRV of the
450-
required Rust feature. If multiple features are required, just use the one with
451-
a lower MSRV.
450+
required Rust feature. If multiple features are used in a suggestion, choose a
451+
MSRV that supports them all.
452452

453453
First, add an MSRV alias for the required feature in [`clippy_utils::msrvs`].
454454
This can be accessed later as `msrvs::STR_STRIP_PREFIX`, for example.

book/src/lint_configuration.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -967,6 +967,7 @@ The minimum rust version that the project supports. Defaults to the `rust-versio
967967
* [`manual_hash_one`](https://rust-lang.github.io/rust-clippy/master/index.html#manual_hash_one)
968968
* [`manual_is_ascii_check`](https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_ascii_check)
969969
* [`manual_is_power_of_two`](https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_power_of_two)
970+
* [`manual_is_variant_and`](https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_variant_and)
970971
* [`manual_isolate_lowest_one`](https://rust-lang.github.io/rust-clippy/master/index.html#manual_isolate_lowest_one)
971972
* [`manual_let_else`](https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else)
972973
* [`manual_midpoint`](https://rust-lang.github.io/rust-clippy/master/index.html#manual_midpoint)

clippy_config/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ publish = false
88

99
[dependencies]
1010
clippy_utils = { path = "../clippy_utils" }
11-
itertools = "0.12"
11+
itertools = "0.15"
1212
serde = { version = "1.0", features = ["derive"] }
1313
toml = "0.7.3"
1414

clippy_config/src/conf.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -815,6 +815,7 @@ define_Conf! {
815815
manual_hash_one,
816816
manual_is_ascii_check,
817817
manual_is_power_of_two,
818+
manual_is_variant_and,
818819
manual_isolate_lowest_one,
819820
manual_let_else,
820821
manual_midpoint,

clippy_dev/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ edition = "2024"
88
chrono = { version = "0.4.38", default-features = false, features = ["clock"] }
99
clap = { version = "4.4", features = ["derive"] }
1010
indoc = "1.0"
11-
itertools = "0.12"
11+
itertools = "0.15"
1212
opener = "0.8"
1313
rustc-literal-escaper = "0.0.7"
1414
walkdir = "2.3"

clippy_lints/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ cargo_metadata = "0.23"
1414
clippy_config = { path = "../clippy_config" }
1515
clippy_utils = { path = "../clippy_utils" }
1616
declare_clippy_lint = { path = "../declare_clippy_lint" }
17-
itertools = "0.12"
17+
itertools = "0.15"
1818
quine-mc_cluskey = "0.2"
1919
regex-syntax = "0.8"
2020
serde = { version = "1.0", features = ["derive"] }

clippy_lints/src/cargo/multiple_crate_versions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ pub(super) fn check(cx: &LateContext<'_>, metadata: &Metadata, allowed_duplicate
3333
for (name, group) in &packages
3434
.iter()
3535
.filter(|p| !allowed_duplicate_crates.contains(p.name.as_str()))
36-
.group_by(|p| &p.name)
36+
.chunk_by(|p| &p.name)
3737
{
3838
let group: Vec<&Package> = group.collect();
3939

clippy_lints/src/casts/cast_possible_wrap.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ pub(super) fn check(
9696
.note("for more information see https://doc.rust-lang.org/reference/types/numeric.html#machine-dependent-integer-types");
9797
}
9898

99-
if msrv.meets(cx, msrvs::INTEGER_SIGN_CAST)
100-
&& let Some(cast) = utils::is_signedness_cast(cast_from, cast_to)
99+
if let Some(cast) = utils::is_signedness_cast(cast_from, cast_to)
100+
&& msrv.meets(cx, msrvs::INTEGER_SIGN_CAST)
101101
{
102102
let method = match cast {
103103
utils::CastTo::Signed => "cast_signed()",

clippy_lints/src/casts/cast_sign_loss.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ pub(super) fn check<'cx>(
5454
expr.span,
5555
format!("casting `{cast_from}` to `{cast_to}` may lose the sign of the value"),
5656
|diag| {
57-
if msrv.meets(cx, msrvs::INTEGER_SIGN_CAST)
58-
&& let Some(cast) = utils::is_signedness_cast(cast_from, cast_to)
57+
if let Some(cast) = utils::is_signedness_cast(cast_from, cast_to)
58+
&& msrv.meets(cx, msrvs::INTEGER_SIGN_CAST)
5959
{
6060
let method = match cast {
6161
utils::CastTo::Signed => "cast_signed()",

0 commit comments

Comments
 (0)