Skip to content

Commit 74d5f35

Browse files
authored
Merge branch 'master' into cast-dangling
2 parents 0b4b66f + 238edf2 commit 74d5f35

File tree

2,740 files changed

+35737
-16746
lines changed

Some content is hidden

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

2,740 files changed

+35737
-16746
lines changed

CHANGELOG.md

Lines changed: 52 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,53 @@ document.
66

77
## Unreleased / Beta / In Rust Nightly
88

9-
[786fbd6d...master](https://github.com/rust-lang/rust-clippy/compare/786fbd6d...master)
9+
[609cd310...master](https://github.com/rust-lang/rust-clippy/compare/609cd310...master)
10+
11+
## Rust 1.85
12+
13+
Current stable, released 2025-02-20
14+
15+
[View all 72 merged pull requests](https://github.com/rust-lang/rust-clippy/pulls?q=merged%3A2024-11-15T19%3A31%3A08Z..2024-12-26T13%3A59%3A48Z+base%3Amaster)
16+
17+
### New Lints
18+
19+
* Added [`repr_packed_without_abi`] to `suspicious`
20+
[#13398](https://github.com/rust-lang/rust-clippy/pull/13398)
21+
* Added [`as_pointer_underscore`] to `restriction`
22+
[#13251](https://github.com/rust-lang/rust-clippy/pull/13251)
23+
* Added [`doc_nested_refdefs`] to `suspicious`
24+
[#13707](https://github.com/rust-lang/rust-clippy/pull/13707)
25+
* Added [`literal_string_with_formatting_args`] to `nursery`
26+
[#13410](https://github.com/rust-lang/rust-clippy/pull/13410)
27+
* Added [`doc_include_without_cfg`] to `restriction`
28+
[#13625](https://github.com/rust-lang/rust-clippy/pull/13625)
29+
30+
### Enhancements
31+
32+
* [`indexing_slicing`]: Can now be allowed in tests using the [`allow-indexing-slicing-in-tests`]
33+
configuration
34+
[#13854](https://github.com/rust-lang/rust-clippy/pull/13854)
35+
* [`if_let_mutex`]: disable lint from Edition 2024 since
36+
[if_let_rescope](https://github.com/rust-lang/rust/issues/131154) was stabilized
37+
[#13695](https://github.com/rust-lang/rust-clippy/pull/13695)
38+
* [`format_in_format_args`], [`recursive_format_impl`], [`to_string_in_format_args`],
39+
[`uninlined_format_args`], [`unused_format_specs`]: Can now support 3rd party format macros
40+
if they're marked with the `#[clippy::format_args]` attribute
41+
[#9948](https://github.com/rust-lang/rust-clippy/pull/9948)
42+
43+
### ICE Fixes
44+
45+
* [`trait_duplication_in_bounds`]: fix ICE on duplicate type or constant bound
46+
[#13722](https://github.com/rust-lang/rust-clippy/pull/13722)
47+
48+
### Others
49+
50+
* `clippy_utils` is now published to crates.io. Note that this crate is and will remain unstable.
51+
[#13700](https://github.com/rust-lang/rust-clippy/pull/13700)
1052

1153
## Rust 1.84
1254

13-
Current stable, released 2025-01-09
55+
Released 2025-01-09
1456

1557
[View all 84 merged pull requests](https://github.com/rust-lang/rust-clippy/pulls?q=merged%3A2024-10-03T21%3A23%3A58Z..2024-11-14T17%3A41%3A37Z+base%3Amaster)
1658

@@ -5530,6 +5572,7 @@ Released 2018-09-13
55305572
[`diverging_sub_expression`]: https://rust-lang.github.io/rust-clippy/master/index.html#diverging_sub_expression
55315573
[`doc_include_without_cfg`]: https://rust-lang.github.io/rust-clippy/master/index.html#doc_include_without_cfg
55325574
[`doc_lazy_continuation`]: https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
5575+
[`doc_link_code`]: https://rust-lang.github.io/rust-clippy/master/index.html#doc_link_code
55335576
[`doc_link_with_quotes`]: https://rust-lang.github.io/rust-clippy/master/index.html#doc_link_with_quotes
55345577
[`doc_markdown`]: https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
55355578
[`doc_nested_refdefs`]: https://rust-lang.github.io/rust-clippy/master/index.html#doc_nested_refdefs
@@ -5742,6 +5785,7 @@ Released 2018-09-13
57425785
[`manual_bits`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_bits
57435786
[`manual_c_str_literals`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals
57445787
[`manual_clamp`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp
5788+
[`manual_contains`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains
57455789
[`manual_dangling_ptr`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_dangling_ptr
57465790
[`manual_div_ceil`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil
57475791
[`manual_filter`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_filter
@@ -5813,6 +5857,7 @@ Released 2018-09-13
58135857
[`mem_discriminant_non_enum`]: https://rust-lang.github.io/rust-clippy/master/index.html#mem_discriminant_non_enum
58145858
[`mem_forget`]: https://rust-lang.github.io/rust-clippy/master/index.html#mem_forget
58155859
[`mem_replace_option_with_none`]: https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_option_with_none
5860+
[`mem_replace_option_with_some`]: https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_option_with_some
58165861
[`mem_replace_with_default`]: https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_with_default
58175862
[`mem_replace_with_uninit`]: https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_with_uninit
58185863
[`min_ident_chars`]: https://rust-lang.github.io/rust-clippy/master/index.html#min_ident_chars
@@ -5940,6 +5985,7 @@ Released 2018-09-13
59405985
[`out_of_bounds_indexing`]: https://rust-lang.github.io/rust-clippy/master/index.html#out_of_bounds_indexing
59415986
[`overflow_check_conditional`]: https://rust-lang.github.io/rust-clippy/master/index.html#overflow_check_conditional
59425987
[`overly_complex_bool_expr`]: https://rust-lang.github.io/rust-clippy/master/index.html#overly_complex_bool_expr
5988+
[`owned_cow`]: https://rust-lang.github.io/rust-clippy/master/index.html#owned_cow
59435989
[`panic`]: https://rust-lang.github.io/rust-clippy/master/index.html#panic
59445990
[`panic_in_result_fn`]: https://rust-lang.github.io/rust-clippy/master/index.html#panic_in_result_fn
59455991
[`panic_params`]: https://rust-lang.github.io/rust-clippy/master/index.html#panic_params
@@ -6068,6 +6114,7 @@ Released 2018-09-13
60686114
[`single_element_loop`]: https://rust-lang.github.io/rust-clippy/master/index.html#single_element_loop
60696115
[`single_match`]: https://rust-lang.github.io/rust-clippy/master/index.html#single_match
60706116
[`single_match_else`]: https://rust-lang.github.io/rust-clippy/master/index.html#single_match_else
6117+
[`single_option_map`]: https://rust-lang.github.io/rust-clippy/master/index.html#single_option_map
60716118
[`single_range_in_vec_init`]: https://rust-lang.github.io/rust-clippy/master/index.html#single_range_in_vec_init
60726119
[`size_of_in_element_count`]: https://rust-lang.github.io/rust-clippy/master/index.html#size_of_in_element_count
60736120
[`size_of_ref`]: https://rust-lang.github.io/rust-clippy/master/index.html#size_of_ref
@@ -6144,6 +6191,7 @@ Released 2018-09-13
61446191
[`type_complexity`]: https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
61456192
[`type_id_on_box`]: https://rust-lang.github.io/rust-clippy/master/index.html#type_id_on_box
61466193
[`type_repetition_in_bounds`]: https://rust-lang.github.io/rust-clippy/master/index.html#type_repetition_in_bounds
6194+
[`unbuffered_bytes`]: https://rust-lang.github.io/rust-clippy/master/index.html#unbuffered_bytes
61476195
[`unchecked_duration_subtraction`]: https://rust-lang.github.io/rust-clippy/master/index.html#unchecked_duration_subtraction
61486196
[`unconditional_recursion`]: https://rust-lang.github.io/rust-clippy/master/index.html#unconditional_recursion
61496197
[`undocumented_unsafe_blocks`]: https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
@@ -6268,6 +6316,7 @@ Released 2018-09-13
62686316
[`accept-comment-above-statement`]: https://doc.rust-lang.org/clippy/lint_configuration.html#accept-comment-above-statement
62696317
[`allow-comparison-to-zero`]: https://doc.rust-lang.org/clippy/lint_configuration.html#allow-comparison-to-zero
62706318
[`allow-dbg-in-tests`]: https://doc.rust-lang.org/clippy/lint_configuration.html#allow-dbg-in-tests
6319+
[`allow-expect-in-consts`]: https://doc.rust-lang.org/clippy/lint_configuration.html#allow-expect-in-consts
62716320
[`allow-expect-in-tests`]: https://doc.rust-lang.org/clippy/lint_configuration.html#allow-expect-in-tests
62726321
[`allow-indexing-slicing-in-tests`]: https://doc.rust-lang.org/clippy/lint_configuration.html#allow-indexing-slicing-in-tests
62736322
[`allow-mixed-uninlined-format-args`]: https://doc.rust-lang.org/clippy/lint_configuration.html#allow-mixed-uninlined-format-args
@@ -6276,6 +6325,7 @@ Released 2018-09-13
62766325
[`allow-print-in-tests`]: https://doc.rust-lang.org/clippy/lint_configuration.html#allow-print-in-tests
62776326
[`allow-private-module-inception`]: https://doc.rust-lang.org/clippy/lint_configuration.html#allow-private-module-inception
62786327
[`allow-renamed-params-for`]: https://doc.rust-lang.org/clippy/lint_configuration.html#allow-renamed-params-for
6328+
[`allow-unwrap-in-consts`]: https://doc.rust-lang.org/clippy/lint_configuration.html#allow-unwrap-in-consts
62796329
[`allow-unwrap-in-tests`]: https://doc.rust-lang.org/clippy/lint_configuration.html#allow-unwrap-in-tests
62806330
[`allow-useless-vec-in-tests`]: https://doc.rust-lang.org/clippy/lint_configuration.html#allow-useless-vec-in-tests
62816331
[`allowed-dotfiles`]: https://doc.rust-lang.org/clippy/lint_configuration.html#allowed-dotfiles

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "clippy"
33
# begin autogenerated version
4-
version = "0.1.86"
4+
version = "0.1.87"
55
# end autogenerated version
66
description = "A bunch of helpful lints to avoid common pitfalls in Rust"
77
repository = "https://github.com/rust-lang/rust-clippy"
@@ -25,7 +25,7 @@ path = "src/driver.rs"
2525
[dependencies]
2626
clippy_config = { path = "clippy_config" }
2727
clippy_lints = { path = "clippy_lints" }
28-
rustc_tools_util = "0.4.0"
28+
rustc_tools_util = { path = "rustc_tools_util", version = "0.4.2" }
2929
tempfile = { version = "3.3", optional = true }
3030
termize = "0.1"
3131
color-print = "0.3.4"
@@ -54,7 +54,7 @@ parking_lot = "0.12"
5454
tokio = { version = "1", features = ["io-util"] }
5555

5656
[build-dependencies]
57-
rustc_tools_util = "0.4.0"
57+
rustc_tools_util = { path = "rustc_tools_util", version = "0.4.2" }
5858

5959
[features]
6060
integration = ["tempfile"]

book/src/attribs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ To do this, Clippy provides attributes that can be applied to items in the 3rd p
55

66
## `#[clippy::format_args]`
77

8-
_Available since Clippy v1.84_
8+
_Available since Clippy v1.85_
99

1010
This attribute can be added to a macro that supports `format!`, `println!`, or similar syntax.
1111
It tells Clippy that the macro is a formatting macro, and that the arguments to the macro

book/src/development/adding_lints.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ from the lint to the code of the test file and compare that to the contents of a
169169
Use `cargo bless` to automatically generate the `.fixed` file while running
170170
the tests.
171171

172-
[rustfix]: https://github.com/rust-lang/rustfix
172+
[rustfix]: https://github.com/rust-lang/cargo/tree/master/crates/rustfix
173173

174174
## Testing manually
175175

@@ -788,7 +788,7 @@ don't hesitate to ask on [Zulip] or in the issue/PR.
788788
[`snippet`]: https://doc.rust-lang.org/nightly/nightly-rustc/clippy_utils/source/fn.snippet.html
789789
[let-chains]: https://github.com/rust-lang/rust/pull/94927
790790
[from_expansion]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_span/struct.Span.html#method.from_expansion
791-
[in_external_macro]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/lint/fn.in_external_macro.html
791+
[in_external_macro]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_span/struct.Span.html#method.in_external_macro
792792
[span]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_span/struct.Span.html
793793
[applicability]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_errors/enum.Applicability.html
794794
[rustc-dev-guide]: https://rustc-dev-guide.rust-lang.org/

book/src/development/basics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ or if you modify a test file to add a test case.
7575
> _Note:_ This command may update more files than you intended. In that case
7676
> only commit the files you wanted to update.
7777
78-
[UI test]: https://rustc-dev-guide.rust-lang.org/tests/adding.html#guide-to-the-ui-tests
78+
[UI test]: https://rustc-dev-guide.rust-lang.org/tests/adding.html#ui-test-walkthrough
7979

8080
## `cargo dev`
8181

book/src/development/common_tools_writing_lints.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ functions to deal with macros:
218218
> context. And so just using `span.from_expansion()` is often good enough.
219219
220220

221-
- `in_external_macro(span)`: detect if the given span is from a macro defined in
221+
- `span.in_external_macro(sm)`: detect if the given span is from a macro defined in
222222
a foreign crate. If you want the lint to work with macro-generated code, this
223223
is the next line of defense to avoid macros not defined in the current crate.
224224
It doesn't make sense to lint code that the coder can't change.
@@ -227,15 +227,13 @@ functions to deal with macros:
227227
crates
228228

229229
```rust
230-
use rustc_middle::lint::in_external_macro;
231-
232230
use a_crate_with_macros::foo;
233231

234232
// `foo` is defined in `a_crate_with_macros`
235233
foo!("bar");
236234

237235
// if we lint the `match` of `foo` call and test its span
238-
assert_eq!(in_external_macro(cx.sess(), match_span), true);
236+
assert_eq!(match_span.in_external_macro(cx.sess().source_map()), true);
239237
```
240238

241239
- `span.ctxt()`: the span's context represents whether it is from expansion, and

book/src/development/macro_expansions.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ assert_ne!(x_is_some_span.ctxt(), x_unwrap_span.ctxt());
120120

121121
### The `in_external_macro` function
122122

123-
`rustc_middle::lint` provides a function ([`in_external_macro`]) that can
123+
`Span` provides a method ([`in_external_macro`]) that can
124124
detect if the given span is from a macro defined in a foreign crate.
125125

126126
Therefore, if we really want a new lint to work with macro-generated code,
@@ -144,7 +144,7 @@ Also assume that we get the corresponding variable `foo_span` for the
144144
results in `true` (note that `cx` can be `EarlyContext` or `LateContext`):
145145

146146
```rust
147-
if in_external_macro(cx.sess(), foo_span) {
147+
if foo_span.in_external_macro(cx.sess().source_map()) {
148148
// We should ignore macro from a foreign crate.
149149
return;
150150
}
@@ -153,6 +153,6 @@ if in_external_macro(cx.sess(), foo_span) {
153153
[`ctxt`]: https://doc.rust-lang.org/stable/nightly-rustc/rustc_span/struct.Span.html#method.ctxt
154154
[expansion]: https://rustc-dev-guide.rust-lang.org/macro-expansion.html#expansion-and-ast-integration
155155
[`from_expansion`]: https://doc.rust-lang.org/stable/nightly-rustc/rustc_span/struct.Span.html#method.from_expansion
156-
[`in_external_macro`]: https://doc.rust-lang.org/stable/nightly-rustc/rustc_middle/lint/fn.in_external_macro.html
156+
[`in_external_macro`]: https://doc.rust-lang.org/stable/nightly-rustc/rustc_span/struct.Span.html#method.in_external_macro
157157
[Span]: https://doc.rust-lang.org/stable/nightly-rustc/rustc_span/struct.Span.html
158158
[SyntaxContext]: https://doc.rust-lang.org/stable/nightly-rustc/rustc_span/hygiene/struct.SyntaxContext.html

book/src/development/writing_tests.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ We'll talk about suggestions more in depth in a [later chapter](emitting_lints.m
203203
Use `cargo bless` to automatically generate the `.fixed` file after running
204204
the tests.
205205

206-
[`rustfix`]: https://github.com/rust-lang/rustfix
206+
[`rustfix`]: https://github.com/rust-lang/cargo/tree/master/crates/rustfix
207207
[`span_lint_and_sugg`]: https://doc.rust-lang.org/beta/nightly-rustc/clippy_utils/diagnostics/fn.span_lint_and_sugg.html
208208

209209
## Testing Manually

book/src/lint_configuration.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,16 @@ Whether `dbg!` should be allowed in test functions or `#[cfg(test)]`
7171
* [`dbg_macro`](https://rust-lang.github.io/rust-clippy/master/index.html#dbg_macro)
7272

7373

74+
## `allow-expect-in-consts`
75+
Whether `expect` should be allowed in code always evaluated at compile time
76+
77+
**Default Value:** `true`
78+
79+
---
80+
**Affected lints:**
81+
* [`expect_used`](https://rust-lang.github.io/rust-clippy/master/index.html#expect_used)
82+
83+
7484
## `allow-expect-in-tests`
7585
Whether `expect` should be allowed in test functions or `#[cfg(test)]`
7686

@@ -108,7 +118,7 @@ Whether to allow `r#""#` when `r""` can be used
108118

109119
---
110120
**Affected lints:**
111-
* [`unnecessary_raw_string_hashes`](https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_raw_string_hashes)
121+
* [`needless_raw_string_hashes`](https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes)
112122

113123

114124
## `allow-panic-in-tests`
@@ -164,6 +174,16 @@ default configuration of Clippy. By default, any configuration will replace the
164174
* [`renamed_function_params`](https://rust-lang.github.io/rust-clippy/master/index.html#renamed_function_params)
165175

166176

177+
## `allow-unwrap-in-consts`
178+
Whether `unwrap` should be allowed in code always evaluated at compile time
179+
180+
**Default Value:** `true`
181+
182+
---
183+
**Affected lints:**
184+
* [`unwrap_used`](https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used)
185+
186+
167187
## `allow-unwrap-in-tests`
168188
Whether `unwrap` should be allowed in test functions or `#[cfg(test)]`
169189

@@ -360,6 +380,7 @@ Suppress lints whenever the suggested change would cause breakage for other crat
360380
* [`linkedlist`](https://rust-lang.github.io/rust-clippy/master/index.html#linkedlist)
361381
* [`needless_pass_by_ref_mut`](https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut)
362382
* [`option_option`](https://rust-lang.github.io/rust-clippy/master/index.html#option_option)
383+
* [`owned_cow`](https://rust-lang.github.io/rust-clippy/master/index.html#owned_cow)
363384
* [`rc_buffer`](https://rust-lang.github.io/rust-clippy/master/index.html#rc_buffer)
364385
* [`rc_mutex`](https://rust-lang.github.io/rust-clippy/master/index.html#rc_mutex)
365386
* [`redundant_allocation`](https://rust-lang.github.io/rust-clippy/master/index.html#redundant_allocation)
@@ -740,13 +761,16 @@ The minimum rust version that the project supports. Defaults to the `rust-versio
740761
* [`index_refutable_slice`](https://rust-lang.github.io/rust-clippy/master/index.html#index_refutable_slice)
741762
* [`iter_kv_map`](https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map)
742763
* [`legacy_numeric_constants`](https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants)
764+
* [`lines_filter_map_ok`](https://rust-lang.github.io/rust-clippy/master/index.html#lines_filter_map_ok)
743765
* [`manual_bits`](https://rust-lang.github.io/rust-clippy/master/index.html#manual_bits)
744766
* [`manual_c_str_literals`](https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals)
745767
* [`manual_clamp`](https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp)
768+
* [`manual_flatten`](https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten)
746769
* [`manual_hash_one`](https://rust-lang.github.io/rust-clippy/master/index.html#manual_hash_one)
747770
* [`manual_is_ascii_check`](https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_ascii_check)
748771
* [`manual_let_else`](https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else)
749772
* [`manual_non_exhaustive`](https://rust-lang.github.io/rust-clippy/master/index.html#manual_non_exhaustive)
773+
* [`manual_option_as_slice`](https://rust-lang.github.io/rust-clippy/master/index.html#manual_option_as_slice)
750774
* [`manual_pattern_char_comparison`](https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison)
751775
* [`manual_range_contains`](https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains)
752776
* [`manual_rem_euclid`](https://rust-lang.github.io/rust-clippy/master/index.html#manual_rem_euclid)
@@ -761,6 +785,7 @@ The minimum rust version that the project supports. Defaults to the `rust-versio
761785
* [`map_unwrap_or`](https://rust-lang.github.io/rust-clippy/master/index.html#map_unwrap_or)
762786
* [`map_with_unused_argument_over_ranges`](https://rust-lang.github.io/rust-clippy/master/index.html#map_with_unused_argument_over_ranges)
763787
* [`match_like_matches_macro`](https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro)
788+
* [`mem_replace_option_with_some`](https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_option_with_some)
764789
* [`mem_replace_with_default`](https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_with_default)
765790
* [`missing_const_for_fn`](https://rust-lang.github.io/rust-clippy/master/index.html#missing_const_for_fn)
766791
* [`needless_borrow`](https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow)

book/src/lints.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,5 +101,18 @@ The `clippy::cargo` group gives you suggestions on how to improve your
101101
your crate and are not sure if you have all useful information in your
102102
`Cargo.toml`.
103103

104+
## Nursery
105+
106+
The `clippy::nursery` group contains lints which are buggy or need more work. It is **not**
107+
recommended to enable the whole group, but rather cherry-pick lints that are useful for your
108+
code base and your use case.
109+
110+
## Deprecated
111+
112+
The `clippy::deprecated` is empty lints that exist to ensure that `#[allow(lintname)]` still
113+
compiles after the lint was deprecated. Deprecation "removes" lints by removing their
114+
functionality and marking them as deprecated, which may cause further warnings but cannot
115+
cause a compiler error.
116+
104117
[Clippy lint documentation]: https://rust-lang.github.io/rust-clippy/
105118
[Clippy 1.0 RFC]: https://github.com/rust-lang/rfcs/blob/master/text/2476-clippy-uno.md#lint-audit-and-categories

0 commit comments

Comments
 (0)