Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
130 commits
Select commit Hold shift + click to select a range
8ec8389
fix(unnecessary_sort_by): use first closure param name in reverse sor…
laffed Apr 16, 2026
f6a921c
fix: [manual_slice_fill] detect for in loops over &mut [T; n] slices
Gri-ffin Apr 28, 2026
a259d0a
absolute_paths.rs: change item in "What it does" example
DanielEScherzer Apr 28, 2026
9fc79b2
Avoid map_unwrap_or fix when default is adjusted
cyphercodes Apr 28, 2026
fbb4036
Add new `chunks_exact_to_as_chunks` lint
rommeld Nov 1, 2025
8710368
add skip lint when is_ty_unified is true.
rommeld Jan 12, 2026
74ad9b6
remove multiple calls to expr_use_ctxt
Apr 29, 2026
f057719
let_underscore_future: skip when type is annotated
ChrisJr404 May 12, 2026
029b8d2
Attributes cleanup in tests [12/20]
samueltardieu May 21, 2026
6c8aae7
refactor TypeRelativePath::AssocItem to use AliasTerm, remove alias_t…
josetorrs Jun 10, 2026
c60910b
Remove unused is_type_const from hir::TraitItemKind
josetorrs Jun 10, 2026
a945bdf
Rollup merge of #157330 - josetorrs:remove-is-type-const, r=BoxyUwU
jhpratt Jun 11, 2026
2ae1735
New `by_ref_peekable_peek` lint
samueltardieu May 20, 2026
85daf6e
Merge commit '5f29bd0df789f92cd494061f9223dbb5d96e8e16' into clippy-s…
flip1995 Jun 11, 2026
824aa1f
New `by_ref_peekable_peek` lint (#17042)
Jarcho Jun 11, 2026
6ccea6c
remove AliasTerm::def_id()
khyperia Jun 11, 2026
5076a6b
Refactor `drain_collect` and clarify the lint messages.
Jarcho Jun 11, 2026
a71d118
Replace `is_range_full` with `is_full_collection_range`.
Jarcho Jun 11, 2026
372057a
Added PhantomPinned diagnostic item and prevented dead field warning …
asder8215 Jun 11, 2026
ebedc9b
unnecessary_lazy_evaluations: handle closure `->`
notriddle Jun 12, 2026
934018e
perf: skip doc_markdown text collection and word scan when the lint i…
xmakro Jun 12, 2026
51844e3
perf: check is_in_test last in incompatible_msrv
xmakro Jun 12, 2026
82f47b2
perf: check is_in_test last in incompatible_msrv (#17218)
samueltardieu Jun 13, 2026
81c4ee5
perf: check the token kind before extracting source in early literal …
xmakro Jun 13, 2026
aa783f1
perf: match expression shape before MSRV check in cloned_ref_to_slice…
xmakro Jun 12, 2026
75b49df
perf: compare method names before type queries in three lint passes
xmakro Jun 12, 2026
49bb992
perf: check the method name first in or_fun_call
xmakro Jun 12, 2026
a972a88
perf: skip single_component_path_imports module walk when nothing to …
xmakro Jun 12, 2026
2027f8a
Address nits
notriddle Jun 13, 2026
e8cb380
perf: skip doc_markdown text collection and word scan when the lint i…
samueltardieu Jun 13, 2026
9f5eee6
perf: match expression shape before MSRV check in cloned_ref_to_slice…
samueltardieu Jun 13, 2026
a5035b1
perf: check the token kind before extracting source in early literal …
samueltardieu Jun 13, 2026
71f1cdd
Refactor `drain_collect` and clarify the lint messages. (#17212)
samueltardieu Jun 13, 2026
5f662cc
Rollup merge of #157653 - khyperia:AliasTerm-def_id, r=BoxyUwU
jhpratt Jun 13, 2026
1a9ff0c
Rollup merge of #157782 - asder8215:phantom_pinned_dead_code, r=BoxyU…
jhpratt Jun 13, 2026
c749c60
Be less assertive about the gains obtained through `mul_add`
samueltardieu Jun 13, 2026
9eec7b3
unnecessary_lazy_evaluations: handle closure `->` (#17216)
Jarcho Jun 13, 2026
4c00cc4
absolute_paths.rs: change item in "What it does" example (#16927)
Jarcho Jun 13, 2026
47c0125
Fix `unnecessary_sort_by` reverse suggestion using wrong closure para…
Jarcho Jun 13, 2026
9705782
fix: defer adjusted unwrap_or type lookup
cyphercodes Jun 13, 2026
3d5b7a6
Change `HasSession` to `HasSourceMap`
Jarcho May 2, 2025
c5f215e
Rename `SpanRangeExt` to `SpanExt`
Jarcho May 2, 2025
9c88e49
Rename `get_source_text` and `check_source_text` to `get_text` and `c…
Jarcho Nov 19, 2025
24ef470
Pre snippet rework (#17231)
samueltardieu Jun 13, 2026
8df7348
Attributes cleanup in tests [12/20] (#17096)
ada4a Jun 13, 2026
345dafc
extract the tests out of `methods.rs`
ada4a Jun 13, 2026
f0974c9
misc improvements
ada4a Jun 13, 2026
f6bc2c8
misc: wrap everything in `span_lint_and_then`
ada4a Jun 13, 2026
67878aa
refactor(`unit_return_expecting_ord`): use one big `span_lint_and_then`
ada4a Sep 9, 2025
72dc832
extract suggestion out of the main message
ada4a Jun 13, 2026
537443b
fix: respect reduced applicability
ada4a Jun 13, 2026
bef6f41
also suggest in the multi-line case
ada4a Jun 14, 2026
6032abe
`filter_next`: big clean-up (#17233)
Jarcho Jun 14, 2026
6f66667
perf: skip single_component_path_imports module walk when nothing to …
Jarcho Jun 14, 2026
4200d7f
Add funding links
Kobzol Jun 14, 2026
5a17348
Merge comment and cfg checking in `matches` lint pass.
Jarcho Jun 14, 2026
3dcef78
refactor(`unit_return_expecting_ord`): use one big `span_lint_and_the…
dswij Jun 14, 2026
15025dc
Fix ICE when the `clippy::author` attribute is applied to an item
samueltardieu Jun 14, 2026
d9517a6
fix: [std_instead_of_core] false positive for core::io
bushrat011899 May 5, 2026
6667ea1
Don't trigger `unnecessary_box_returns` when the size depends on gene…
mistaste Jun 15, 2026
3054d6f
Add test for Box<Vec<T>> with known layout
mistaste Jun 15, 2026
cabc5a6
Revert "feat: Add profile-specific configuration for disallowed metho…
blyxyas Jun 15, 2026
491d90b
Do not trigger `ref_patterns` lint on automatically derived code
Hamdan-Khan Jun 15, 2026
b6eda57
Be less assertive about the gains obtained through `mul_add` (#17222)
dswij Jun 15, 2026
db59d2a
Fix ICE when the `clippy::author` attribute is applied to an item (#1…
Jarcho Jun 15, 2026
e74196a
Do not trigger `ref_patterns` lint on automatically derived code (#17…
samueltardieu Jun 15, 2026
a6b9266
fix [`std_instead_of_core`]: false positives for `core::io`/MSRV (#16…
Jarcho Jun 16, 2026
b86961c
Add lint to suggest as_chunks over chunks_exact with constant (#16931)
Jarcho Jun 17, 2026
2c4afb4
Avoid map_unwrap_or fix when default is adjusted (#16928)
Jarcho Jun 17, 2026
440f1a4
fix: [manual_slice_fill] detect for in loops over &mut [T; N] slices …
Jarcho Jun 17, 2026
91e537b
Don't trigger `unnecessary_box_returns` when the size depends on gene…
llogiq Jun 17, 2026
65be426
Merge comment and cfg checking in `matches` lint pass. (#17239)
llogiq Jun 17, 2026
77fc280
Replace `is_range_full` with `is_full_collection_range` (#17213)
llogiq Jun 17, 2026
faaf6d6
let_underscore_future: skip bindings with an explicit type annotation…
llogiq Jun 17, 2026
4130605
Enable triagebot `merge` and `delegate` commands
Urgau Jun 17, 2026
830e6eb
Do not check for unused lifetimes in expanded code
samueltardieu Jun 16, 2026
d7246b0
Do not check for unused lifetimes in expanded code (#17256)
Jarcho Jun 17, 2026
bfb63ab
fix(same_type_modulo_regions): also ignore regions in references
ada4a Aug 29, 2025
ec2d840
fix(extra_unused_type_parameters): don't suggest an autofix
ada4a Oct 19, 2025
dab03c8
fix: avoid ICE when evaluating constants containing unsized type args
Gri-ffin May 8, 2026
4afa801
feat(unnecessary_unwrap_unchecked): new lint
ada4a Aug 29, 2025
8773a78
feat(unnecessary_unwrap_unchecked): new lint (#16252)
samueltardieu Jun 18, 2026
0203e27
fix(extra_unused_type_parameters): don't suggest an autofix (#15907)
llogiq Jun 18, 2026
57f180d
prevent OOM/hang when checking validity of large types by changing to…
Gri-ffin Jun 10, 2026
26adec9
Fix OOM panic for large types on uninit check (#17205)
Jarcho Jun 18, 2026
782225d
Find a shared context for the format string and the `format!` call in…
Jarcho Jun 14, 2026
ad11a21
Take more precise arguments in `is_const_evaluatable`.
Jarcho Jun 12, 2026
29f1ca9
Take `TyCtxt` in `for_each_expr`
Jarcho Jun 12, 2026
9deffbd
Use `for_each_expr` in `is_const_evaluable`.
Jarcho Jun 12, 2026
aac7672
Store the `ConstEvalCtxt` inside the `expr_eagerness` visitor.
Jarcho Jun 12, 2026
2f89caf
Put a box within `{Early,Late}LintPassFactory`
nnethercote Jun 12, 2026
48e7567
perf: skip tokenizing in span_contains_cfg when no '#' is present
xmakro Jun 12, 2026
ec157cf
perf: skip tokenizing in span_contains_cfg when no '#' is present (#1…
ada4a Jun 19, 2026
161d0e2
avoid const eval in items with impossible bounds
Gri-ffin Jun 19, 2026
fedd496
perf: compare method names before type queries in three lint passes (…
llogiq Jun 19, 2026
7cfa292
only check impossible bounds for generic const accesses
Gri-ffin Jun 19, 2026
27d44f7
Avoid ICE when evaluating constants containing unsized type args (#16…
Jarcho Jun 19, 2026
822349a
perf: check the method name first in or_fun_call (#17266)
llogiq Jun 19, 2026
642f0e3
perf: skip match_same_arms work when the lint is allowed
xmakro Jun 12, 2026
dbfa2c3
perf: run structural checks before const context queries in question_…
xmakro Jun 12, 2026
6423f06
Treat `!` the same as `-` in `unnecessary_cast`
notriddle Jun 20, 2026
0354717
perf: skip match_same_arms work when the lint is allowed (#17272)
Jarcho Jun 20, 2026
79499c8
perf: run structural checks before const context queries in question_…
samueltardieu Jun 20, 2026
d0a919d
Find a shared context for the format string and the `format!` call (#…
dswij Jun 20, 2026
55dc552
Clean up unrelated tests
notriddle Jun 21, 2026
53e0ed0
Move issue 11882 tests into same unnecessary_cast
notriddle Jun 21, 2026
01458a7
Update actions/checkout to v7
alex-semenyuk Jun 20, 2026
0556e4c
remove AliasTy::def_id()
khyperia Jun 21, 2026
ca7ffdd
Move all test cases out of named constants
notriddle Jun 21, 2026
5445218
Treat `!` the same as `-` in `unnecessary_cast` (#17278)
Jarcho Jun 21, 2026
7641812
Do not trigger `manual_option_zip` when map receiver is a lazy evalua…
Hamdan-Khan Jun 22, 2026
4a123b2
Enable triagebot `merge` and `delegate` commands (#17258)
flip1995 Jun 22, 2026
a570b29
Update actions/checkout to v7 (#17284)
flip1995 Jun 22, 2026
70d77f5
Add funding links (#17238)
flip1995 Jun 22, 2026
6e6921c
Simplify `missing_inline_in_public_items`.
Jarcho Jun 22, 2026
fd956e6
Create a single `ConstEvalCtxt` in `expr_eagerness` (#17228)
rustbot Jun 23, 2026
753b3a9
Move `empty_enums` to the nursery
Jarcho Jun 23, 2026
def1c09
Simplify `missing_inline_in_public_items` (#17292)
dswij Jun 23, 2026
aacb854
Auto merge of #158013 - khyperia:AliasTy-def_id, r=BoxyUwU
bors Jun 23, 2026
6ea0a2f
Do not trigger `manual_option_zip` when map receiver is a lazy evalua…
rustbot Jun 23, 2026
8f9dd5d
Revert "feat: Add profile-specific configuration for disallowed metho…
rustbot Jun 23, 2026
4755296
Move `empty_enums` to the nursery (#17298)
llogiq Jun 25, 2026
e0588c2
fix: `needless_late_init` FN for if/match in block expr
profetia Mar 12, 2026
6d4ad63
Extend `needless_late_init` to cover grouped assignments
profetia Mar 22, 2026
3be3a9c
Enhance `needless_late_init` to cover grouped assignments (#16746)
rustbot Jun 25, 2026
6964da6
Merge remote-tracking branch 'upstream/master' into rustup
flip1995 Jun 25, 2026
bf8aa08
Bump nightly version -> 2026-06-25
flip1995 Jun 25, 2026
64c7431
Rustup (#17306)
flip1995 Jun 25, 2026
0ab64f5
Merge commit '64c7431d6cd823d1a7663165c7e59d78e6dc726a' into clippy-s…
flip1995 Jun 25, 2026
91c04df
cg_gcc: Fix Clippy lint fallout
flip1995 Jun 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
24 changes: 18 additions & 6 deletions compiler/rustc_codegen_gcc/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,19 @@ pub fn bytes_in_context<'gcc, 'tcx>(cx: &CodegenCx<'gcc, 'tcx>, bytes: &[u8]) ->
// or is it using a more efficient representation?
match bytes.len() % 8 {
0 => {
debug_assert_eq!(
bytes.len() % 8,
0,
"bytes length is not a multiple of 8, so bytes.as_chunks will have a remainder"
);
let context = &cx.context;
let byte_type = context.new_type::<u64>();
let typ = new_array_type(context, None, byte_type, bytes.len() as u64 / 8);
let elements: Vec<_> = bytes
.chunks_exact(8)
.map(|arr| {
let arr: [u8; 8] = arr.try_into().unwrap();
.as_chunks::<8>()
.0
.iter()
.map(|&arr| {
context.new_rvalue_from_long(
byte_type,
// Since we are representing arbitrary byte runs as integers, we need to follow the target
Expand All @@ -79,13 +85,19 @@ pub fn bytes_in_context<'gcc, 'tcx>(cx: &CodegenCx<'gcc, 'tcx>, bytes: &[u8]) ->
context.new_array_constructor(None, typ, &elements)
}
4 => {
debug_assert_eq!(
bytes.len() % 4,
0,
"bytes length is not a multiple of 4, so bytes.as_chunks will have a remainder"
);
let context = &cx.context;
let byte_type = context.new_type::<u32>();
let typ = new_array_type(context, None, byte_type, bytes.len() as u64 / 4);
let elements: Vec<_> = bytes
.chunks_exact(4)
.map(|arr| {
let arr: [u8; 4] = arr.try_into().unwrap();
.as_chunks::<4>()
.0
.iter()
.map(|&arr| {
context.new_rvalue_from_int(
byte_type,
match cx.sess().target.options.endian {
Expand Down
2 changes: 2 additions & 0 deletions src/tools/clippy/.github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github: rustfoundation
custom: [ "rust-lang.org/funding" ]
2 changes: 1 addition & 1 deletion src/tools/clippy/.github/workflows/clippy_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
steps:
# Setup
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
# Unsetting this would make so that any malicious package could get our Github Token
persist-credentials: false
Expand Down
8 changes: 4 additions & 4 deletions src/tools/clippy/.github/workflows/clippy_mq.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
steps:
# Setup
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
persist-credentials: false

Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:
steps:
# Setup
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
persist-credentials: false

Expand All @@ -112,7 +112,7 @@ jobs:
steps:
# Setup
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
persist-credentials: false

Expand Down Expand Up @@ -168,7 +168,7 @@ jobs:
steps:
# Setup
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
persist-credentials: false

Expand Down
2 changes: 1 addition & 1 deletion src/tools/clippy/.github/workflows/clippy_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
steps:
# Setup
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
# Unsetting this would make so that any malicious package could get our Github Token
persist-credentials: false
Expand Down
4 changes: 2 additions & 2 deletions src/tools/clippy/.github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ jobs:
steps:
# Setup
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
# Unsetting this would make so that any malicious package could get our Github Token
persist-credentials: false

- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
ref: ${{ env.TARGET_BRANCH }}
path: 'out'
Expand Down
6 changes: 3 additions & 3 deletions src/tools/clippy/.github/workflows/lintcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
fetch-depth: 2
# Unsetting this would make so that any malicious package could get our Github Token
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
# Unsetting this would make so that any malicious package could get our Github Token
persist-credentials: false
Expand Down Expand Up @@ -113,7 +113,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
# Unsetting this would make so that any malicious package could get our Github Token
persist-credentials: false
Expand Down
2 changes: 1 addition & 1 deletion src/tools/clippy/.github/workflows/remark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
steps:
# Setup
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
# Unsetting this would make so that any malicious package could get our Github Token
persist-credentials: false
Expand Down
5 changes: 4 additions & 1 deletion src/tools/clippy/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6670,6 +6670,7 @@ Released 2018-09-13
[`boxed_local`]: https://rust-lang.github.io/rust-clippy/master/index.html#boxed_local
[`branches_sharing_code`]: https://rust-lang.github.io/rust-clippy/master/index.html#branches_sharing_code
[`builtin_type_shadow`]: https://rust-lang.github.io/rust-clippy/master/index.html#builtin_type_shadow
[`by_ref_peekable_peek`]: https://rust-lang.github.io/rust-clippy/master/index.html#by_ref_peekable_peek
[`byte_char_slices`]: https://rust-lang.github.io/rust-clippy/master/index.html#byte_char_slices
[`bytes_count_to_len`]: https://rust-lang.github.io/rust-clippy/master/index.html#bytes_count_to_len
[`bytes_nth`]: https://rust-lang.github.io/rust-clippy/master/index.html#bytes_nth
Expand All @@ -6694,6 +6695,7 @@ Released 2018-09-13
[`chars_last_cmp`]: https://rust-lang.github.io/rust-clippy/master/index.html#chars_last_cmp
[`chars_next_cmp`]: https://rust-lang.github.io/rust-clippy/master/index.html#chars_next_cmp
[`checked_conversions`]: https://rust-lang.github.io/rust-clippy/master/index.html#checked_conversions
[`chunks_exact_to_as_chunks`]: https://rust-lang.github.io/rust-clippy/master/index.html#chunks_exact_to_as_chunks
[`clear_with_drain`]: https://rust-lang.github.io/rust-clippy/master/index.html#clear_with_drain
[`clone_double_ref`]: https://rust-lang.github.io/rust-clippy/master/index.html#clone_double_ref
[`clone_on_copy`]: https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
Expand Down Expand Up @@ -7457,6 +7459,7 @@ Released 2018-09-13
[`unnecessary_to_owned`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned
[`unnecessary_trailing_comma`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_trailing_comma
[`unnecessary_unwrap`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap
[`unnecessary_unwrap_unchecked`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap_unchecked
[`unnecessary_wraps`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps
[`unneeded_field_pattern`]: https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_field_pattern
[`unneeded_struct_pattern`]: https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern
Expand Down Expand Up @@ -7571,6 +7574,7 @@ Released 2018-09-13
[`avoid-breaking-exported-api`]: https://doc.rust-lang.org/clippy/lint_configuration.html#avoid-breaking-exported-api
[`await-holding-invalid-types`]: https://doc.rust-lang.org/clippy/lint_configuration.html#await-holding-invalid-types
[`cargo-ignore-publish`]: https://doc.rust-lang.org/clippy/lint_configuration.html#cargo-ignore-publish
[`check-grouped-late-init`]: https://doc.rust-lang.org/clippy/lint_configuration.html#check-grouped-late-init
[`check-incompatible-msrv-in-tests`]: https://doc.rust-lang.org/clippy/lint_configuration.html#check-incompatible-msrv-in-tests
[`check-inconsistent-struct-field-initializers`]: https://doc.rust-lang.org/clippy/lint_configuration.html#check-inconsistent-struct-field-initializers
[`check-private-items`]: https://doc.rust-lang.org/clippy/lint_configuration.html#check-private-items
Expand Down Expand Up @@ -7608,7 +7612,6 @@ Released 2018-09-13
[`module-items-ordered-within-groupings`]: https://doc.rust-lang.org/clippy/lint_configuration.html#module-items-ordered-within-groupings
[`msrv`]: https://doc.rust-lang.org/clippy/lint_configuration.html#msrv
[`pass-by-value-size-limit`]: https://doc.rust-lang.org/clippy/lint_configuration.html#pass-by-value-size-limit
[`profiles`]: https://doc.rust-lang.org/clippy/lint_configuration.html#profiles
[`pub-underscore-fields-behavior`]: https://doc.rust-lang.org/clippy/lint_configuration.html#pub-underscore-fields-behavior
[`recursive-self-in-type-definitions`]: https://doc.rust-lang.org/clippy/lint_configuration.html#recursive-self-in-type-definitions
[`semicolon-inside-block-ignore-singleline`]: https://doc.rust-lang.org/clippy/lint_configuration.html#semicolon-inside-block-ignore-singleline
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
clippy_check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- name: Run Clippy
run: cargo clippy --all-targets --all-features
```
53 changes: 31 additions & 22 deletions src/tools/clippy/book/src/lint_configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,37 @@ For internal testing only, ignores the current `publish` settings in the Cargo m
* [`cargo_common_metadata`](https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata)


## `check-grouped-late-init`
Whether to check for grouped late initializations from multiple `let` statements.

#### Example
```rust
let a;
let b;
if true {
a = 1;
b = 2;
} else {
a = 3;
b = 4;
}
```
Use instead:
```rust
let (a, b) = if true {
(1, 2)
} else {
(3, 4)
};
```

**Default Value:** `true`

---
**Affected lints:**
* [`needless_late_init`](https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init)


## `check-incompatible-msrv-in-tests`
Whether to check MSRV compatibility in `#[test]` and `#[cfg(test)]` code.

Expand Down Expand Up @@ -986,28 +1017,6 @@ The minimum size (in bytes) to consider a type for passing by reference instead
* [`large_types_passed_by_value`](https://rust-lang.github.io/rust-clippy/master/index.html#large_types_passed_by_value)


## `profiles`
Named profiles of disallowed items (unrelated to Cargo build profiles).

#### Example

```toml
[profiles.persistent]
disallowed-methods = [{ path = "std::env::temp_dir" }]
disallowed-types = [{ path = "std::time::Instant", reason = "use our custom time API" }]

[profiles.single_threaded]
disallowed-methods = [{ path = "std::thread::spawn" }]
```

**Default Value:** `{}`

---
**Affected lints:**
* [`disallowed_methods`](https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_methods)
* [`disallowed_types`](https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_types)


## `pub-underscore-fields-behavior`
Lint "public" fields in a struct that are prefixed with an underscore based on their
exported visibility, or whether they are marked as "pub".
Expand Down
Loading
Loading