Skip to content

Commit 7c275d0

Browse files
committed
Auto merge of #146728 - flip1995:clippy-subtree-update, r=samueltardieu
Clippy subtree update r? `@Manishearth` `Cargo.lock` update due to release/Clippy version bump.
2 parents 0c0c58b + 5d1619b commit 7c275d0

File tree

164 files changed

+4380
-2479
lines changed

Some content is hidden

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

164 files changed

+4380
-2479
lines changed

Cargo.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675"
568568

569569
[[package]]
570570
name = "clippy"
571-
version = "0.1.91"
571+
version = "0.1.92"
572572
dependencies = [
573573
"anstream",
574574
"askama",
@@ -595,7 +595,7 @@ dependencies = [
595595

596596
[[package]]
597597
name = "clippy_config"
598-
version = "0.1.91"
598+
version = "0.1.92"
599599
dependencies = [
600600
"clippy_utils",
601601
"itertools",
@@ -618,7 +618,7 @@ dependencies = [
618618

619619
[[package]]
620620
name = "clippy_lints"
621-
version = "0.1.91"
621+
version = "0.1.92"
622622
dependencies = [
623623
"arrayvec",
624624
"cargo_metadata 0.18.1",
@@ -649,7 +649,7 @@ dependencies = [
649649

650650
[[package]]
651651
name = "clippy_utils"
652-
version = "0.1.91"
652+
version = "0.1.92"
653653
dependencies = [
654654
"arrayvec",
655655
"itertools",
@@ -1051,7 +1051,7 @@ dependencies = [
10511051

10521052
[[package]]
10531053
name = "declare_clippy_lint"
1054-
version = "0.1.91"
1054+
version = "0.1.92"
10551055

10561056
[[package]]
10571057
name = "derive-where"

src/tools/clippy/.github/ISSUE_TEMPLATE/new_lint.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
name: New lint suggestion
2-
description: |
3-
Suggest a new Clippy lint (currently not accepting new lints)
4-
Check out the Clippy book for more information about the feature freeze.
2+
description: Suggest a new Clippy lint.
53
labels: ["A-lint"]
64
body:
75
- type: markdown

src/tools/clippy/.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ order to get feedback.
3232

3333
Delete this line and everything above before opening your PR.
3434

35-
Note that we are currently not taking in new PRs that add new lints. We are in a
36-
feature freeze. Check out the book for more information. If you open a
37-
feature-adding pull request, its review will be delayed.
38-
3935
---
4036

4137
*Please write a short comment explaining your change (or "none" for internal only changes)*

src/tools/clippy/.github/workflows/feature_freeze.yml

Lines changed: 0 additions & 45 deletions
This file was deleted.

src/tools/clippy/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,6 @@ helper.txt
4848

4949
# mdbook generated output
5050
/book/book
51+
52+
# Remove jujutsu directory from search tools
53+
.jj

src/tools/clippy/CHANGELOG.md

Lines changed: 147 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,152 @@ document.
66

77
## Unreleased / Beta / In Rust Nightly
88

9-
[4ef75291...master](https://github.com/rust-lang/rust-clippy/compare/4ef75291...master)
9+
[e9b7045...master](https://github.com/rust-lang/rust-clippy/compare/e9b7045...master)
10+
11+
## Rust 1.90
12+
13+
Current stable, released 2025-09-18
14+
15+
[View all 118 merged pull requests](https://github.com/rust-lang/rust-clippy/pulls?q=merged%3A2025-06-13T15%3A55%3A04Z..2025-07-25T13%3A24%3A00Z+base%3Amaster)
16+
17+
Note: This Clippy release does not introduce many new lints and is focused entirely on bug fixes — see
18+
[#15086](https://github.com/rust-lang/rust-clippy/issues/15086) for more details.
19+
20+
## New Lints
21+
22+
* Added [`manual_is_multiple_of`] to `complexity` [#14292](https://github.com/rust-lang/rust-clippy/pull/14292)
23+
* Added [`doc_broken_link`] to `pedantic` [#13696](https://github.com/rust-lang/rust-clippy/pull/13696)
24+
25+
### Moves and Deprecations
26+
27+
* Move [`uninlined_format_args`] to `pedantic` (from `style`, now allow-by-default) [#15287](https://github.com/rust-lang/rust-clippy/pull/15287)
28+
29+
### Enhancements
30+
31+
* [`or_fun_call`] now lints `Option::get_or_insert`, `Result::map_or`, `Option/Result::and` methods
32+
[#15071](https://github.com/rust-lang/rust-clippy/pull/15071)
33+
[#15073](https://github.com/rust-lang/rust-clippy/pull/15073)
34+
[#15074](https://github.com/rust-lang/rust-clippy/pull/15074)
35+
* [`incompatible_msrv`] now recognizes types exceeding MSRV
36+
[#15296](https://github.com/rust-lang/rust-clippy/pull/15296)
37+
* [`incompatible_msrv`] now checks the right MSRV when in a `const` context
38+
[#15297](https://github.com/rust-lang/rust-clippy/pull/15297)
39+
* [`zero_ptr`] now lints in `const` context as well
40+
[#15152](https://github.com/rust-lang/rust-clippy/pull/15152)
41+
* [`map_identity`],[`flat_map_identity`] now recognizes `|[x, y]| [x, y]` as an identity function
42+
[#15229](https://github.com/rust-lang/rust-clippy/pull/15229)
43+
* [`exit`] no longer fails on the main function when using `--test` or `--all-targets` flag
44+
[#15222](https://github.com/rust-lang/rust-clippy/pull/15222)
45+
46+
### False Positive Fixes
47+
48+
* [`if_then_some_else_none`] fixed FP when require type coercion
49+
[#15267](https://github.com/rust-lang/rust-clippy/pull/15267)
50+
* [`module_name_repetitions`] fixed FP on exported macros
51+
[#15319](https://github.com/rust-lang/rust-clippy/pull/15319)
52+
* [`unused_async`] fixed FP on function with `todo!`
53+
[#15308](https://github.com/rust-lang/rust-clippy/pull/15308)
54+
* [`useless_attribute`] fixed FP when using `#[expect(redundant_imports)]` and similar lint attributes
55+
on `use` statements
56+
[#15318](https://github.com/rust-lang/rust-clippy/pull/15318)
57+
* [`pattern_type_mismatch`] fixed FP in external macro
58+
[#15306](https://github.com/rust-lang/rust-clippy/pull/15306)
59+
* [`large_enum_variant`] fixed FP by not suggesting `Box` in `no_std` mode
60+
[#15241](https://github.com/rust-lang/rust-clippy/pull/15241)
61+
* [`missing_inline_in_public_items`] fixed FP on functions with `extern`
62+
[#15313](https://github.com/rust-lang/rust-clippy/pull/15313)
63+
* [`needless_range_loop`] fixed FP on array literals
64+
[#15314](https://github.com/rust-lang/rust-clippy/pull/15314)
65+
* [`ptr_as_ptr`] fixed wrong suggestions with turbo fish
66+
[#15289](https://github.com/rust-lang/rust-clippy/pull/15289)
67+
* [`range_plus_one`], [`range_minus_one`] fixed FP by restricting lint to cases where it is safe
68+
to switch the range type
69+
[#14432](https://github.com/rust-lang/rust-clippy/pull/14432)
70+
* [`ptr_arg`] fixed FP with underscore binding to `&T` or `&mut T` argument
71+
[#15105](https://github.com/rust-lang/rust-clippy/pull/15105)
72+
* [`unsafe_derive_deserialize`] fixed FP caused by the standard library's `pin!()` macro
73+
[#15137](https://github.com/rust-lang/rust-clippy/pull/15137)
74+
* [`unused_trait_names`] fixed FP in macros
75+
[#14947](https://github.com/rust-lang/rust-clippy/pull/14947)
76+
* [`expect_fun_call`] fixed invalid suggestions
77+
[#15122](https://github.com/rust-lang/rust-clippy/pull/15122)
78+
* [`manual_is_multiple_of`] fixed various false positives
79+
[#15205](https://github.com/rust-lang/rust-clippy/pull/15205)
80+
* [`manual_assert`] fixed wrong suggestions for macros
81+
[#15264](https://github.com/rust-lang/rust-clippy/pull/15264)
82+
* [`expect_used`] fixed false negative when meeting `Option::ok().expect`
83+
[#15253](https://github.com/rust-lang/rust-clippy/pull/15253)
84+
* [`manual_abs_diff`] fixed wrong suggestions behind refs
85+
[#15265](https://github.com/rust-lang/rust-clippy/pull/15265)
86+
* [`approx_constant`] fixed FP with overly precise literals and non trivially formatted numerals
87+
[#15236](https://github.com/rust-lang/rust-clippy/pull/15236)
88+
* [`arithmetic_side_effects`] fixed FP on `NonZeroU*.get() - 1`
89+
[#15238](https://github.com/rust-lang/rust-clippy/pull/15238)
90+
* [`legacy_numeric_constants`] fixed suggestion when call is inside parentheses
91+
[#15191](https://github.com/rust-lang/rust-clippy/pull/15191)
92+
* [`manual_is_variant_and`] fixed inverted suggestions that could lead to code with different semantics
93+
[#15206](https://github.com/rust-lang/rust-clippy/pull/15206)
94+
* [`unnecessary_map_or`] fixed FP by not proposing to replace `map_or` call when types wouldn't be correct
95+
[#15181](https://github.com/rust-lang/rust-clippy/pull/15181)
96+
* [`return_and_then`] fixed FP in case of a partially used expression
97+
[#15115](https://github.com/rust-lang/rust-clippy/pull/15115)
98+
* [`manual_let_else`] fixed FP with binding subpattern with unused name
99+
[#15118](https://github.com/rust-lang/rust-clippy/pull/15118)
100+
* [`suboptimal_flops`] fixed FP with ambiguous float types in mul_add suggestions
101+
[#15133](https://github.com/rust-lang/rust-clippy/pull/15133)
102+
* [`borrow_as_ptr`] fixed FP by not removing cast to trait object pointer
103+
[#15145](https://github.com/rust-lang/rust-clippy/pull/15145)
104+
* [`unnecessary_operation`] fixed FP by not removing casts if they are useful to type the expression
105+
[#15182](https://github.com/rust-lang/rust-clippy/pull/15182)
106+
* [`empty_loop`] fixed FP on intrinsic function declaration
107+
[#15201](https://github.com/rust-lang/rust-clippy/pull/15201)
108+
* [`doc_nested_refdefs`] fixed FP where task lists are reported as refdefs
109+
[#15146](https://github.com/rust-lang/rust-clippy/pull/15146)
110+
* [`std_instead_of_core`] fixed FP when not all items come from the new crate
111+
[#15165](https://github.com/rust-lang/rust-clippy/pull/15165)
112+
* [`swap_with_temporary`] fixed FP leading to different semantics being suggested
113+
[#15172](https://github.com/rust-lang/rust-clippy/pull/15172)
114+
* [`cast_possible_truncation`] fixed FP by not giving suggestions inside const context
115+
[#15164](https://github.com/rust-lang/rust-clippy/pull/15164)
116+
* [`missing_panics_doc`] fixed FP by allowing unwrap() and expect()s in const-only contexts
117+
[#15170](https://github.com/rust-lang/rust-clippy/pull/15170)
118+
* [`disallowed_script_idents`] fixed FP on identifiers with `_`
119+
[#15123](https://github.com/rust-lang/rust-clippy/pull/15123)
120+
* [`wildcard_enum_match_arm`] fixed wrong suggestions with raw identifiers
121+
[#15093](https://github.com/rust-lang/rust-clippy/pull/15093)
122+
* [`borrow_deref_ref`] fixed FP by not proposing replacing a reborrow when the reborrow is itself mutably borrowed
123+
[#14967](https://github.com/rust-lang/rust-clippy/pull/14967)
124+
* [`manual_ok_err`] fixed wrong suggestions with references
125+
[#15053](https://github.com/rust-lang/rust-clippy/pull/15053)
126+
* [`identity_op`] fixed FP when encountering `Default::default()`
127+
[#15028](https://github.com/rust-lang/rust-clippy/pull/15028)
128+
* [`exhaustive_structs`] fixed FP on structs with default valued field
129+
[#15022](https://github.com/rust-lang/rust-clippy/pull/15022)
130+
* [`collapsible_else_if`] fixed FP on conditionally compiled stmt
131+
[#14906](https://github.com/rust-lang/rust-clippy/pull/14906)
132+
* [`missing_const_for_fn`] fixed FP by checking MSRV before emitting lint on function containing
133+
non-`Sized` trait bounds
134+
[#15080](https://github.com/rust-lang/rust-clippy/pull/15080)
135+
* [`question_mark`] fixed FP when else branch of let-else contains `#[cfg]`
136+
[#15082](https://github.com/rust-lang/rust-clippy/pull/15082)
137+
138+
### ICE Fixes
139+
140+
* [`single_match`] fixed ICE with deref patterns and string literals
141+
[#15124](https://github.com/rust-lang/rust-clippy/pull/15124)
142+
* [`needless_doctest_main`] fixed panic when doctest is invalid
143+
[#15052](https://github.com/rust-lang/rust-clippy/pull/15052)
144+
* [`zero_sized_map_values`] do not attempt to compute size of a type with escaping lifetimes
145+
[#15434](https://github.com/rust-lang/rust-clippy/pull/15434)
146+
147+
### Documentation Improvements
148+
149+
* [`manual_is_variant_and`] improved documentation to include equality comparison patterns
150+
[#15239](https://github.com/rust-lang/rust-clippy/pull/15239)
151+
* [`uninlined_format_args`] improved documentation with example of how to fix a `{:?}` parameter
152+
[#15228](https://github.com/rust-lang/rust-clippy/pull/15228)
153+
* [`undocumented_unsafe_blocks`] improved documentation wording
154+
[#15213](https://github.com/rust-lang/rust-clippy/pull/15213)
10155

11156
## Rust 1.89
12157

@@ -6408,6 +6553,7 @@ Released 2018-09-13
64086553
[`redundant_feature_names`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_feature_names
64096554
[`redundant_field_names`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
64106555
[`redundant_guards`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards
6556+
[`redundant_iter_cloned`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_iter_cloned
64116557
[`redundant_locals`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_locals
64126558
[`redundant_pattern`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern
64136559
[`redundant_pattern_matching`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching

src/tools/clippy/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "clippy"
3-
version = "0.1.91"
3+
version = "0.1.92"
44
description = "A bunch of helpful lints to avoid common pitfalls in Rust"
55
repository = "https://github.com/rust-lang/rust-clippy"
66
readme = "README.md"

src/tools/clippy/book/src/README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
# Clippy
22

3-
[### IMPORTANT NOTE FOR CONTRIBUTORS ================](development/feature_freeze.md)
4-
5-
----
6-
73
[![License: MIT OR Apache-2.0](https://img.shields.io/crates/l/clippy.svg)](https://github.com/rust-lang/rust-clippy#license)
84

95
A collection of lints to catch common mistakes and improve your

src/tools/clippy/book/src/SUMMARY.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
- [GitLab CI](continuous_integration/gitlab.md)
1414
- [Travis CI](continuous_integration/travis.md)
1515
- [Development](development/README.md)
16-
- [IMPORTANT: FEATURE FREEZE](development/feature_freeze.md)
1716
- [Basics](development/basics.md)
1817
- [Adding Lints](development/adding_lints.md)
1918
- [Defining Lints](development/defining_lints.md)

src/tools/clippy/book/src/development/adding_lints.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
# Adding a new lint
22

3-
[### IMPORTANT NOTE FOR CONTRIBUTORS ================](feature_freeze.md)
4-
5-
63
You are probably here because you want to add a new lint to Clippy. If this is
74
the first time you're contributing to Clippy, this document guides you through
85
creating an example lint from scratch.

0 commit comments

Comments
 (0)