Skip to content

Commit d933bc3

Browse files
author
Ype Kingma
committed
Merge branch 'master' into lifetimes_bound_nested_ref_dev
2 parents 998ed6a + 510cfe3 commit d933bc3

File tree

609 files changed

+12427
-5272
lines changed

Some content is hidden

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

609 files changed

+12427
-5272
lines changed

.github/workflows/lintcheck.yml

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
name: Lintcheck
2+
3+
on: pull_request
4+
5+
env:
6+
RUST_BACKTRACE: 1
7+
CARGO_INCREMENTAL: 0
8+
9+
concurrency:
10+
# For a given workflow, if we push to the same PR, cancel all previous builds on that PR.
11+
group: "${{ github.workflow }}-${{ github.event.pull_request.number}}"
12+
cancel-in-progress: true
13+
14+
jobs:
15+
# Runs lintcheck on the PR's target branch and stores the results as an artifact
16+
base:
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 2
24+
25+
# HEAD is the generated merge commit `refs/pull/N/merge` between the PR and `master`, `HEAD^`
26+
# being the commit from `master` that is the base of the merge
27+
- name: Checkout base
28+
run: git checkout HEAD^
29+
30+
# Use the lintcheck from the PR to generate the JSON in case the PR modifies lintcheck in some
31+
# way
32+
- name: Checkout current lintcheck
33+
run: |
34+
rm -rf lintcheck
35+
git checkout ${{ github.sha }} -- lintcheck
36+
37+
- name: Cache lintcheck bin
38+
id: cache-lintcheck-bin
39+
uses: actions/cache@v4
40+
with:
41+
path: target/debug/lintcheck
42+
key: lintcheck-bin-${{ hashfiles('lintcheck/**') }}
43+
44+
- name: Build lintcheck
45+
if: steps.cache-lintcheck-bin.outputs.cache-hit != 'true'
46+
run: cargo build --manifest-path=lintcheck/Cargo.toml
47+
48+
- name: Create cache key
49+
id: key
50+
run: echo "key=lintcheck-base-${{ hashfiles('lintcheck/**') }}-$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
51+
52+
- name: Cache results JSON
53+
id: cache-json
54+
uses: actions/cache@v4
55+
with:
56+
path: lintcheck-logs/lintcheck_crates_logs.json
57+
key: ${{ steps.key.outputs.key }}
58+
59+
- name: Run lintcheck
60+
if: steps.cache-json.outputs.cache-hit != 'true'
61+
run: ./target/debug/lintcheck --format json --warn-all
62+
63+
- name: Upload base JSON
64+
uses: actions/upload-artifact@v4
65+
with:
66+
name: base
67+
path: lintcheck-logs/lintcheck_crates_logs.json
68+
69+
# Runs lintcheck on the PR and stores the results as an artifact
70+
head:
71+
runs-on: ubuntu-latest
72+
73+
steps:
74+
- name: Checkout
75+
uses: actions/checkout@v4
76+
77+
- name: Cache lintcheck bin
78+
id: cache-lintcheck-bin
79+
uses: actions/cache@v4
80+
with:
81+
path: target/debug/lintcheck
82+
key: lintcheck-bin-${{ hashfiles('lintcheck/**') }}
83+
84+
- name: Build lintcheck
85+
if: steps.cache-lintcheck-bin.outputs.cache-hit != 'true'
86+
run: cargo build --manifest-path=lintcheck/Cargo.toml
87+
88+
- name: Run lintcheck
89+
run: ./target/debug/lintcheck --format json --warn-all
90+
91+
- name: Upload head JSON
92+
uses: actions/upload-artifact@v4
93+
with:
94+
name: head
95+
path: lintcheck-logs/lintcheck_crates_logs.json
96+
97+
# Retrieves the head and base JSON results and prints the diff to the GH actions step summary
98+
diff:
99+
runs-on: ubuntu-latest
100+
101+
needs: [base, head]
102+
103+
steps:
104+
- name: Checkout
105+
uses: actions/checkout@v4
106+
107+
- name: Restore lintcheck bin
108+
uses: actions/cache/restore@v4
109+
with:
110+
path: target/debug/lintcheck
111+
key: lintcheck-bin-${{ hashfiles('lintcheck/**') }}
112+
fail-on-cache-miss: true
113+
114+
- name: Download JSON
115+
uses: actions/download-artifact@v4
116+
117+
- name: Diff results
118+
run: ./target/debug/lintcheck diff {base,head}/lintcheck_crates_logs.json >> $GITHUB_STEP_SUMMARY

CHANGELOG.md

Lines changed: 73 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,69 @@ document.
66

77
## Unreleased / Beta / In Rust Nightly
88

9-
[93f0a9a9...master](https://github.com/rust-lang/rust-clippy/compare/93f0a9a9...master)
9+
[ca3b3937...master](https://github.com/rust-lang/rust-clippy/compare/ca3b3937...master)
10+
11+
## Rust 1.79
12+
13+
Current stable, released 2024-06-13
14+
15+
[View all 102 merged pull requests](https://github.com/rust-lang/rust-clippy/pulls?q=merged%3A2024-03-08T11%3A13%3A58Z..2024-04-18T15%3A50%3A50Z+base%3Amaster)
16+
17+
### New Lints
18+
19+
* Added [`legacy_numeric_constants`] to `style`
20+
[#12312](https://github.com/rust-lang/rust-clippy/pull/12312)
21+
* Added [`missing_transmute_annotations`] to `suspicious`
22+
[#12239](https://github.com/rust-lang/rust-clippy/pull/12239)
23+
* Added [`integer_division_remainder_used`] to `restriction`
24+
[#12451](https://github.com/rust-lang/rust-clippy/pull/12451)
25+
* Added [`duplicated_attributes`] to `suspicious`
26+
[#12378](https://github.com/rust-lang/rust-clippy/pull/12378)
27+
* Added [`manual_unwrap_or_default`] to `suspicious`
28+
[#12440](https://github.com/rust-lang/rust-clippy/pull/12440)
29+
* Added [`zero_repeat_side_effects`] to `suspicious`
30+
[#12449](https://github.com/rust-lang/rust-clippy/pull/12449)
31+
* Added [`const_is_empty`] to `suspicious`
32+
[#12310](https://github.com/rust-lang/rust-clippy/pull/12310)
33+
34+
### Moves and Deprecations
35+
36+
* Moved [`box_default`] to `style` (From `perf`)
37+
[#12601](https://github.com/rust-lang/rust-clippy/pull/12601)
38+
* Moved [`manual_clamp`] to `complexity` (From `nursery` now warn-by-default)
39+
[#12543](https://github.com/rust-lang/rust-clippy/pull/12543)
40+
* Moved [`readonly_write_lock`] to `perf` (From `nursery` now warn-by-default)
41+
[#12479](https://github.com/rust-lang/rust-clippy/pull/12479)
42+
43+
### Enhancements
44+
45+
* [`module_name_repetitions`]: Added the [`allowed-prefixes`] configuration to allow common prefixes.
46+
[#12573](https://github.com/rust-lang/rust-clippy/pull/12573)
47+
* [`cast_sign_loss`], [`cast_possible_truncation`], [`cast_lossless`]: Are now allowed in macros
48+
[#12631](https://github.com/rust-lang/rust-clippy/pull/12631)
49+
* [`manual_clamp`]: Now only lints on constant min and max values
50+
[#12543](https://github.com/rust-lang/rust-clippy/pull/12543)
51+
* [`assigning_clones`]: Now considers the [`msrv`] configuration
52+
[#12511](https://github.com/rust-lang/rust-clippy/pull/12511)
53+
* [`needless_return`], [`useless_let_if_seq`], [`mut_mut`], [`read_zero_byte_vec`], [`unused_io_amount`],
54+
[`unused_peekable`]: Now respects `#[allow]` attributes on the affected statement instead
55+
[#12446](https://github.com/rust-lang/rust-clippy/pull/12446)
56+
57+
### False Positive Fixes
58+
59+
* [`cast_lossless`]: No longer lints when casting to `u128`
60+
[#12496](https://github.com/rust-lang/rust-clippy/pull/12496)
61+
* [`std_instead_of_core`] No longer lints on modules that are only in `std`
62+
[#12447](https://github.com/rust-lang/rust-clippy/pull/12447)
63+
64+
### ICE Fixes
65+
66+
* [`needless_return`]: No longer crashes on non-ascii characters
67+
[#12493](https://github.com/rust-lang/rust-clippy/pull/12493)
1068

1169
## Rust 1.78
1270

13-
Current stable, released 2024-05-02
71+
Released 2024-05-02
1472

1573
[View all 112 merged pull requests](https://github.com/rust-lang/rust-clippy/pulls?q=merged%3A2024-01-26T05%3A46%3A23Z..2024-03-07T16%3A25%3A52Z+base%3Amaster)
1674

@@ -1885,7 +1943,7 @@ Released 2022-05-19
18851943
[#8218](https://github.com/rust-lang/rust-clippy/pull/8218)
18861944
* [`needless_match`]
18871945
[#8471](https://github.com/rust-lang/rust-clippy/pull/8471)
1888-
* [`allow_attributes_without_reason`] (Requires `#![feature(lint_reasons)]`)
1946+
* [`allow_attributes_without_reason`]
18891947
[#8504](https://github.com/rust-lang/rust-clippy/pull/8504)
18901948
* [`print_in_format_impl`]
18911949
[#8253](https://github.com/rust-lang/rust-clippy/pull/8253)
@@ -5178,6 +5236,7 @@ Released 2018-09-13
51785236
[`boxed_local`]: https://rust-lang.github.io/rust-clippy/master/index.html#boxed_local
51795237
[`branches_sharing_code`]: https://rust-lang.github.io/rust-clippy/master/index.html#branches_sharing_code
51805238
[`builtin_type_shadow`]: https://rust-lang.github.io/rust-clippy/master/index.html#builtin_type_shadow
5239+
[`byte_char_slices`]: https://rust-lang.github.io/rust-clippy/master/index.html#byte_char_slices
51815240
[`bytes_count_to_len`]: https://rust-lang.github.io/rust-clippy/master/index.html#bytes_count_to_len
51825241
[`bytes_nth`]: https://rust-lang.github.io/rust-clippy/master/index.html#bytes_nth
51835242
[`cargo_common_metadata`]: https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata
@@ -5195,6 +5254,7 @@ Released 2018-09-13
51955254
[`cast_sign_loss`]: https://rust-lang.github.io/rust-clippy/master/index.html#cast_sign_loss
51965255
[`cast_slice_different_sizes`]: https://rust-lang.github.io/rust-clippy/master/index.html#cast_slice_different_sizes
51975256
[`cast_slice_from_raw_parts`]: https://rust-lang.github.io/rust-clippy/master/index.html#cast_slice_from_raw_parts
5257+
[`cfg_not_test`]: https://rust-lang.github.io/rust-clippy/master/index.html#cfg_not_test
51985258
[`char_lit_as_u8`]: https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8
51995259
[`chars_last_cmp`]: https://rust-lang.github.io/rust-clippy/master/index.html#chars_last_cmp
52005260
[`chars_next_cmp`]: https://rust-lang.github.io/rust-clippy/master/index.html#chars_next_cmp
@@ -5305,6 +5365,7 @@ Released 2018-09-13
53055365
[`extra_unused_type_parameters`]: https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_type_parameters
53065366
[`fallible_impl_from`]: https://rust-lang.github.io/rust-clippy/master/index.html#fallible_impl_from
53075367
[`field_reassign_with_default`]: https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default
5368+
[`field_scoped_visibility_modifiers`]: https://rust-lang.github.io/rust-clippy/master/index.html#field_scoped_visibility_modifiers
53085369
[`filetype_is_file`]: https://rust-lang.github.io/rust-clippy/master/index.html#filetype_is_file
53095370
[`filter_map`]: https://rust-lang.github.io/rust-clippy/master/index.html#filter_map
53105371
[`filter_map_bool_then`]: https://rust-lang.github.io/rust-clippy/master/index.html#filter_map_bool_then
@@ -5464,6 +5525,7 @@ Released 2018-09-13
54645525
[`manual_find_map`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_find_map
54655526
[`manual_flatten`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten
54665527
[`manual_hash_one`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_hash_one
5528+
[`manual_inspect`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_inspect
54675529
[`manual_instant_elapsed`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_instant_elapsed
54685530
[`manual_is_ascii_check`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_ascii_check
54695531
[`manual_is_finite`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_finite
@@ -5476,10 +5538,12 @@ Released 2018-09-13
54765538
[`manual_next_back`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_next_back
54775539
[`manual_non_exhaustive`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_non_exhaustive
54785540
[`manual_ok_or`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_ok_or
5541+
[`manual_pattern_char_comparison`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison
54795542
[`manual_range_contains`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains
54805543
[`manual_range_patterns`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_patterns
54815544
[`manual_rem_euclid`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_rem_euclid
54825545
[`manual_retain`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_retain
5546+
[`manual_rotate`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_rotate
54835547
[`manual_saturating_arithmetic`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_saturating_arithmetic
54845548
[`manual_slice_size_calculation`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_slice_size_calculation
54855549
[`manual_split_once`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_split_once
@@ -5528,6 +5592,7 @@ Released 2018-09-13
55285592
[`missing_assert_message`]: https://rust-lang.github.io/rust-clippy/master/index.html#missing_assert_message
55295593
[`missing_asserts_for_indexing`]: https://rust-lang.github.io/rust-clippy/master/index.html#missing_asserts_for_indexing
55305594
[`missing_const_for_fn`]: https://rust-lang.github.io/rust-clippy/master/index.html#missing_const_for_fn
5595+
[`missing_const_for_thread_local`]: https://rust-lang.github.io/rust-clippy/master/index.html#missing_const_for_thread_local
55315596
[`missing_docs_in_private_items`]: https://rust-lang.github.io/rust-clippy/master/index.html#missing_docs_in_private_items
55325597
[`missing_enforced_import_renames`]: https://rust-lang.github.io/rust-clippy/master/index.html#missing_enforced_import_renames
55335598
[`missing_errors_doc`]: https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
@@ -5569,6 +5634,7 @@ Released 2018-09-13
55695634
[`needless_borrow`]: https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
55705635
[`needless_borrowed_reference`]: https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference
55715636
[`needless_borrows_for_generic_args`]: https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
5637+
[`needless_character_iteration`]: https://rust-lang.github.io/rust-clippy/master/index.html#needless_character_iteration
55725638
[`needless_collect`]: https://rust-lang.github.io/rust-clippy/master/index.html#needless_collect
55735639
[`needless_continue`]: https://rust-lang.github.io/rust-clippy/master/index.html#needless_continue
55745640
[`needless_doctest_main`]: https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
@@ -5578,6 +5644,7 @@ Released 2018-09-13
55785644
[`needless_late_init`]: https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init
55795645
[`needless_lifetimes`]: https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
55805646
[`needless_match`]: https://rust-lang.github.io/rust-clippy/master/index.html#needless_match
5647+
[`needless_maybe_sized`]: https://rust-lang.github.io/rust-clippy/master/index.html#needless_maybe_sized
55815648
[`needless_option_as_deref`]: https://rust-lang.github.io/rust-clippy/master/index.html#needless_option_as_deref
55825649
[`needless_option_take`]: https://rust-lang.github.io/rust-clippy/master/index.html#needless_option_take
55835650
[`needless_parens_on_range_literals`]: https://rust-lang.github.io/rust-clippy/master/index.html#needless_parens_on_range_literals
@@ -5736,6 +5803,7 @@ Released 2018-09-13
57365803
[`semicolon_outside_block`]: https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_outside_block
57375804
[`separated_literal_suffix`]: https://rust-lang.github.io/rust-clippy/master/index.html#separated_literal_suffix
57385805
[`serde_api_misuse`]: https://rust-lang.github.io/rust-clippy/master/index.html#serde_api_misuse
5806+
[`set_contains_or_insert`]: https://rust-lang.github.io/rust-clippy/master/index.html#set_contains_or_insert
57395807
[`shadow_reuse`]: https://rust-lang.github.io/rust-clippy/master/index.html#shadow_reuse
57405808
[`shadow_same`]: https://rust-lang.github.io/rust-clippy/master/index.html#shadow_same
57415809
[`shadow_unrelated`]: https://rust-lang.github.io/rust-clippy/master/index.html#shadow_unrelated
@@ -5856,6 +5924,7 @@ Released 2018-09-13
58565924
[`unnecessary_lazy_evaluations`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
58575925
[`unnecessary_literal_unwrap`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_literal_unwrap
58585926
[`unnecessary_map_on_constructor`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_on_constructor
5927+
[`unnecessary_min_or_max`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_min_or_max
58595928
[`unnecessary_mut_passed`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed
58605929
[`unnecessary_operation`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_operation
58615930
[`unnecessary_owned_empty_strings`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_owned_empty_strings
@@ -5913,6 +5982,7 @@ Released 2018-09-13
59135982
[`verbose_file_reads`]: https://rust-lang.github.io/rust-clippy/master/index.html#verbose_file_reads
59145983
[`vtable_address_comparisons`]: https://rust-lang.github.io/rust-clippy/master/index.html#vtable_address_comparisons
59155984
[`waker_clone_wake`]: https://rust-lang.github.io/rust-clippy/master/index.html#waker_clone_wake
5985+
[`while_float`]: https://rust-lang.github.io/rust-clippy/master/index.html#while_float
59165986
[`while_immutable_condition`]: https://rust-lang.github.io/rust-clippy/master/index.html#while_immutable_condition
59175987
[`while_let_loop`]: https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop
59185988
[`while_let_on_iterator`]: https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator

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.80"
3+
version = "0.1.81"
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"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ You can add options to your code to `allow`/`warn`/`deny` Clippy lints:
172172

173173
Note: `allow` means to suppress the lint for your code. With `warn` the lint
174174
will only emit a warning, while with `deny` the lint will emit an error, when
175-
triggering for your code. An error causes clippy to exit with an error code, so
175+
triggering for your code. An error causes Clippy to exit with an error code, so
176176
is useful in scripts like CI/CD.
177177

178178
If you do not want to include your lint levels in your code, you can globally
@@ -238,7 +238,7 @@ define the `CLIPPY_DISABLE_DOCS_LINKS` environment variable.
238238
### Specifying the minimum supported Rust version
239239

240240
Projects that intend to support old versions of Rust can disable lints pertaining to newer features by
241-
specifying the minimum supported Rust version (MSRV) in the clippy configuration file.
241+
specifying the minimum supported Rust version (MSRV) in the Clippy configuration file.
242242

243243
```toml
244244
msrv = "1.30.0"

book/src/configuration.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ For more details and options, refer to the Cargo documentation.
9999
### Specifying the minimum supported Rust version
100100

101101
Projects that intend to support old versions of Rust can disable lints pertaining to newer features by specifying the
102-
minimum supported Rust version (MSRV) in the clippy configuration file.
102+
minimum supported Rust version (MSRV) in the Clippy configuration file.
103103

104104
```toml
105105
msrv = "1.30.0"
@@ -133,7 +133,7 @@ Very rarely, you may wish to prevent Clippy from evaluating certain sections of
133133
`clippy` cfg is not set. You may need to provide a stub so that the code compiles:
134134

135135
```rust
136-
#[cfg(not(clippy)]
136+
#[cfg(not(clippy))]
137137
include!(concat!(env!("OUT_DIR"), "/my_big_function-generated.rs"));
138138

139139
#[cfg(clippy)]

book/src/development/adding_lints.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -587,6 +587,11 @@ declare_clippy_lint! {
587587
}
588588
```
589589

590+
If the lint is in the `restriction` group because it lints things that are not
591+
necessarily “bad” but are more of a style choice, then replace the
592+
“Why is this bad?” section heading with “Why restrict this?”, to avoid writing
593+
“Why is this bad? It isn't, but ...”.
594+
590595
Once your lint is merged, this documentation will show up in the [lint
591596
list][lint_list].
592597

book/src/development/basics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ More about [intellij] command usage and reasons.
107107

108108
## lintcheck
109109

110-
`cargo lintcheck` will build and run clippy on a fixed set of crates and
110+
`cargo lintcheck` will build and run Clippy on a fixed set of crates and
111111
generate a log of the results. You can `git diff` the updated log against its
112112
previous version and see what impact your lint made on a small set of crates.
113113
If you add a new lint, please audit the resulting warnings and make sure there

book/src/development/defining_lints.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,11 @@ declare_clippy_lint! {
163163
///
164164
/// ### Example
165165
/// ```rust
166-
/// // example code where clippy issues a warning
166+
/// // example code where Clippy issues a warning
167167
/// ```
168168
/// Use instead:
169169
/// ```rust
170-
/// // example code which does not raise clippy warning
170+
/// // example code which does not raise Clippy warning
171171
/// ```
172172
#[clippy::version = "1.70.0"] // <- In which version was this implemented, keep it up to date!
173173
pub LINT_NAME, // <- The lint name IN_ALL_CAPS

0 commit comments

Comments
 (0)