Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
7fc38a7
feat: introduce a `doc_comments_missing_terminal_punctuation` lint
AudaciousAxiom Aug 28, 2025
abdedec
doc_comments_missing_terminal_punctuation: real md parser
notriddle Sep 26, 2025
7678f3b
doc_comments_missing_terminal_punctuation: exclude doc attributes to …
AudaciousAxiom Sep 27, 2025
e34a90b
doc_comments_missing_terminal_punctuation: exclude tables and code bl…
AudaciousAxiom Sep 27, 2025
36df5d6
doc_comments_missing_terminal_punctuation: handle code spans properly
AudaciousAxiom Sep 27, 2025
d35076e
doc_comments_missing_terminal_punctuation: remove the parens special …
AudaciousAxiom Sep 30, 2025
f246313
doc_comments_missing_terminal_punctuation: accept punctuation in quotes
AudaciousAxiom Oct 2, 2025
2ec2671
doc_comments_missing_terminal_punctuation: treat some trailers as unf…
AudaciousAxiom Oct 2, 2025
53fd302
doc_comments_missing_terminal_punctuation: short-circuit to avoid par…
AudaciousAxiom Oct 5, 2025
76fb0ce
doc_comments_missing_terminal_punctuation: check every paragraph
AudaciousAxiom Oct 18, 2025
52aa4a5
doc_paragraphs_missing_punctuation: rename the lint
AudaciousAxiom Oct 19, 2025
2f9342e
doc_paragraphs_missing_punctuation: update the lint message
AudaciousAxiom Oct 19, 2025
5107f34
refactor(byte_char_slices): clean-up
ada4a Oct 30, 2025
d6936cb
doc_paragraphs_missing_punctuation: update lint metadata
AudaciousAxiom Nov 7, 2025
a0015b8
doc_paragraphs_missing_punctuation: update the lint suggestion help
AudaciousAxiom Nov 8, 2025
aed57a9
doc_paragraphs_missing_punctuation: add a missing period in another test
AudaciousAxiom Nov 8, 2025
a200679
Revert "Rollup merge of #146627 - madsmtm:jemalloc-simplify, r=jdonsz…
Kobzol Nov 13, 2025
2d8211a
Add `large-error-ignored` config-knob
lukaslueg Sep 18, 2025
757bad7
fix `equatable_if_let`: FP in const context
ada4a Aug 13, 2025
386451c
Fix `sliced_string_as_bytes` FP with a `RangeFull`
yotamofek Oct 12, 2025
f279a0b
rename `tests/ui/useless_vec{,_unfixable}.rs`
ada4a Oct 25, 2025
91779ae
rename lint files to match lint name
ada4a Oct 25, 2025
bbb251a
clean-up
ada4a Oct 25, 2025
e1344da
Handle the suggestion-less case inside `print_unchecked_duration_subt…
ada4a Nov 15, 2025
32f5ae1
Give the same message for `Instant - Duration` and `Duration - Duration`
ada4a Nov 15, 2025
cd61be7
Fix `sliced_string_as_bytes` FP with a `RangeFull` (#15873)
llogiq Nov 15, 2025
aa4869f
clean-up
ada4a Oct 24, 2025
f13d246
feat({unnecessary,panicking}_unwrap): lint field accesses
ada4a Oct 24, 2025
0384c20
lint nested field accesses as well
ada4a Oct 25, 2025
215cfed
add tests for partial moves
ada4a Nov 15, 2025
c8e5fff
feat({unnecessary,panicking}_unwrap): lint field accesses (#15949)
llogiq Nov 15, 2025
1e43c23
refactor(span): rename source_len to normalized_source_len
weihanglo Nov 15, 2025
86e036a
Add a `doc_paragraphs_missing_punctuation` lint (#15758)
Alexendoo Nov 15, 2025
03ab7b8
chore(useless_vec): clean-up (#15952)
Alexendoo Nov 15, 2025
4473120
Merge commit '62589a21d351f63d77dcd173c31107e9f1d06328' into clippy-s…
flip1995 Nov 15, 2025
a8c084c
Auto merge of #148957 - flip1995:clippy-subtree-update, r=Manishearth
bors Nov 16, 2025
63c7197
refactor(time_subtraction): give the same message for `Instant - Dura…
Jarcho Nov 16, 2025
01d6d8b
Rework `missing_docs_in_private_items`:
Jarcho May 5, 2025
60050e5
Merge and extend tests for `missing_docs_in_private_items`
Jarcho May 7, 2025
abc17b3
fix(equatable_if_let): don't suggest `=` in const context (#16092)
dswij Nov 17, 2025
2193494
clean-up
ada4a Oct 26, 2025
db4adbd
fix(equatable_if_let): don't lint if pattern or initializer come from…
ada4a Oct 26, 2025
91d7c57
Rework `missing_docs_in_private_items` (#14741)
y21 Nov 17, 2025
2d4c45f
feat: change desuragered match suggestions to NonParen
robert-mccausland Nov 17, 2025
466646f
test: add test case to cast_possible_wrap
robert-mccausland Nov 17, 2025
9e0f3ec
Replace OffsetOf by an actual sum.
cjgillot Oct 25, 2025
e4b3f01
fix: `transmute_bytes_to_str` wrongly unmangled macros
profetia Nov 10, 2025
040cc2d
Mark Alexendoo on vacation
Jarcho Nov 18, 2025
cb56d63
Mark Alexendoo on vacation (#16106)
Jarcho Nov 18, 2025
0ea973e
Fix adjustments
samueltardieu Nov 18, 2025
11636bb
Taking a raw pointer on a union field is safe since Rust 1.92
samueltardieu Nov 13, 2025
f893111
Give all impls a constness
oli-obk Oct 31, 2025
d7064dc
Improve display of "no script" warning
GuillaumeGomez Nov 18, 2025
1e0ed3e
Remove one DOM level for filters menu
GuillaumeGomez Nov 18, 2025
f6cfdd9
Remove one DOM level for lint name filter input and controls
GuillaumeGomez Nov 18, 2025
24e16f9
Taking a raw pointer on a union field is a safe operation (#16079)
Jarcho Nov 18, 2025
1a86849
fix: `useless_asref` suggests wrongly when used in ctor
profetia Nov 18, 2025
04d65f9
Auto merge of #148434 - oli-obk:inherent-const-impl, r=fee1-dead
bors Nov 19, 2025
33eed78
Set myself on vacation
y21 Nov 19, 2025
4d2729b
Set myself on vacation (#16118)
y21 Nov 19, 2025
e4f5090
fix: `transmute_ptr_to_ptr` wrongly unmangled macros
profetia Nov 10, 2025
93a4992
Fix `useless_asref` suggests wrongly when used in ctor (#16115)
llogiq Nov 20, 2025
81ce47a
feat(explicit_deref_methods): don't lint in `impl Deref(Mut)`
ada4a Nov 21, 2025
1f7ac87
Emit error when using path-segment keyword as cfg pred
mu001999 Oct 16, 2025
37b485b
feat(explicit_deref_methods): don't lint in `impl Deref(Mut)` (#16113)
samueltardieu Nov 21, 2025
45168a7
Fix wrongly unmangled macros for `transmute_ptr_to_ptr` and `transmut…
samueltardieu Nov 22, 2025
bf0e3d9
Allow `const_item_interior_mutations` in Clippy tests
Urgau Nov 2, 2025
e74d96b
Rollup merge of #148407 - Urgau:suspicious_int_mutable_consts, r=Jona…
matthiaskrgr Nov 22, 2025
dffbe08
Upgrade actions checkout to v6
alex-semenyuk Nov 22, 2025
86da11f
Update to mdbook 0.5
ehuss Nov 22, 2025
2fc8d71
Simplify jemalloc setup
madsmtm Nov 11, 2025
3efb2ac
Add `large-error-ignored` config-knob (#15697)
llogiq Nov 23, 2025
16241e2
fix: `implicit_hasher` wrongly unmangled macros
profetia Nov 12, 2025
71e7359
fixup warnings around the compiler
jdonszelmann Nov 24, 2025
9e6efd8
Upgrade actions checkout to v6 (#16127)
flip1995 Nov 24, 2025
ca09c59
Back into rotation
blyxyas Nov 24, 2025
432dad4
Back into rotation! (#16141)
blyxyas Nov 24, 2025
640c39c
fix tooling
lcnr Nov 25, 2025
4292841
Fix `implicit_hasher` wrongly unmangled macros (#16129)
Jarcho Nov 26, 2025
7ce95ab
Rollup merge of #148256 - lcnr:orphan-check, r=spastorino,WaffleLapkin
matthiaskrgr Nov 27, 2025
df627dd
fix(equatable_if_let): don't lint if pattern or initializer come from…
dswij Nov 27, 2025
6748911
Clippy lints page improvements and cleanups (#16112)
Alexendoo Nov 27, 2025
a6dfbb3
Stop inserting redundant parenthesis around desugared match expressio…
Alexendoo Nov 27, 2025
e567e30
refactor(byte_char_slices): clean-up (#15985)
Alexendoo Nov 27, 2025
181601c
Merge remote-tracking branch 'upstream/master' into rustup
flip1995 Nov 28, 2025
aa988c8
Bump nightly version -> 2025-11-28
flip1995 Nov 28, 2025
397aa53
Update to mdbook 0.5 (#16130)
flip1995 Nov 28, 2025
92b4b68
Rustup (#16153)
flip1995 Nov 28, 2025
0a1fa79
Merge commit '92b4b68683249c781c3acad742fc6e57c4140ad9' into clippy-s…
flip1995 Nov 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 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@v5
uses: actions/checkout@v6
with:
persist-credentials: false

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

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

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

Expand All @@ -179,7 +179,7 @@ jobs:

# Download
- name: Download target dir
uses: actions/download-artifact@v5
uses: actions/download-artifact@v6
with:
name: binaries
path: target/debug
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@v5
uses: actions/checkout@v6
with:
# Unsetting this would make so that any malicious package could get our Github Token
persist-credentials: false

- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v6
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@v5
uses: actions/checkout@v6
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@v5
uses: actions/checkout@v6
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@v5
uses: actions/checkout@v6
with:
# Unsetting this would make so that any malicious package could get our Github Token
persist-credentials: false
Expand Down
7 changes: 5 additions & 2 deletions src/tools/clippy/.github/workflows/remark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@ on:
merge_group:
pull_request:

env:
MDBOOK_VERSION: 0.5.1

jobs:
remark:
runs-on: ubuntu-latest

steps:
# Setup
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
# Unsetting this would make so that any malicious package could get our Github Token
persist-credentials: false
Expand All @@ -27,7 +30,7 @@ jobs:
- name: Install mdbook
run: |
mkdir mdbook
curl -Lf https://github.com/rust-lang/mdBook/releases/download/v0.4.43/mdbook-v0.4.43-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
curl -Lf https://github.com/rust-lang/mdBook/releases/download/v${MDBOOK_VERSION}/mdbook-v${MDBOOK_VERSION}-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
echo `pwd`/mdbook >> $GITHUB_PATH
# Run
Expand Down
2 changes: 2 additions & 0 deletions src/tools/clippy/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6314,6 +6314,7 @@ Released 2018-09-13
[`doc_markdown`]: https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
[`doc_nested_refdefs`]: https://rust-lang.github.io/rust-clippy/master/index.html#doc_nested_refdefs
[`doc_overindented_list_items`]: https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items
[`doc_paragraphs_missing_punctuation`]: https://rust-lang.github.io/rust-clippy/master/index.html#doc_paragraphs_missing_punctuation
[`doc_suspicious_footnotes`]: https://rust-lang.github.io/rust-clippy/master/index.html#doc_suspicious_footnotes
[`double_comparisons`]: https://rust-lang.github.io/rust-clippy/master/index.html#double_comparisons
[`double_ended_iterator_last`]: https://rust-lang.github.io/rust-clippy/master/index.html#double_ended_iterator_last
Expand Down Expand Up @@ -7121,6 +7122,7 @@ Released 2018-09-13
[`future-size-threshold`]: https://doc.rust-lang.org/clippy/lint_configuration.html#future-size-threshold
[`ignore-interior-mutability`]: https://doc.rust-lang.org/clippy/lint_configuration.html#ignore-interior-mutability
[`inherent-impl-lint-scope`]: https://doc.rust-lang.org/clippy/lint_configuration.html#inherent-impl-lint-scope
[`large-error-ignored`]: https://doc.rust-lang.org/clippy/lint_configuration.html#large-error-ignored
[`large-error-threshold`]: https://doc.rust-lang.org/clippy/lint_configuration.html#large-error-threshold
[`lint-commented-code`]: https://doc.rust-lang.org/clippy/lint_configuration.html#lint-commented-code
[`literal-representation-threshold`]: https://doc.rust-lang.org/clippy/lint_configuration.html#literal-representation-threshold
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@v5
- uses: actions/checkout@v6
- name: Run Clippy
run: cargo clippy --all-targets --all-features
```
11 changes: 11 additions & 0 deletions src/tools/clippy/book/src/lint_configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -681,6 +681,17 @@ Sets the scope ("crate", "file", or "module") in which duplicate inherent `impl`
* [`multiple_inherent_impl`](https://rust-lang.github.io/rust-clippy/master/index.html#multiple_inherent_impl)


## `large-error-ignored`
A list of paths to types that should be ignored as overly large `Err`-variants in a
`Result` returned from a function

**Default Value:** `[]`

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


## `large-error-threshold`
The maximum size of the `Err`-variant in a `Result` returned from a function

Expand Down
4 changes: 4 additions & 0 deletions src/tools/clippy/clippy_config/src/conf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,10 @@ define_Conf! {
/// Sets the scope ("crate", "file", or "module") in which duplicate inherent `impl` blocks for the same type are linted.
#[lints(multiple_inherent_impl)]
inherent_impl_lint_scope: InherentImplLintScope = InherentImplLintScope::Crate,
/// A list of paths to types that should be ignored as overly large `Err`-variants in a
/// `Result` returned from a function
#[lints(result_large_err)]
large_error_ignored: Vec<String> = Vec::default(),
/// The maximum size of the `Err`-variant in a `Result` returned from a function
#[lints(result_large_err)]
large_error_threshold: u64 = 128,
Expand Down
51 changes: 23 additions & 28 deletions src/tools/clippy/clippy_lints/src/byte_char_slices.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ declare_lint_pass!(ByteCharSlice => [BYTE_CHAR_SLICES]);

impl EarlyLintPass for ByteCharSlice {
fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) {
if let Some(slice) = is_byte_char_slices(expr)
&& !expr.span.from_expansion()
if !expr.span.from_expansion()
&& let Some(slice) = is_byte_char_slices(expr)
{
span_lint_and_sugg(
cx,
Expand All @@ -47,33 +47,28 @@ impl EarlyLintPass for ByteCharSlice {
}
}

/// Checks whether the slice is that of byte chars, and if so, builds a byte-string out of it
fn is_byte_char_slices(expr: &Expr) -> Option<String> {
if let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, expr) = &expr.kind {
match &expr.kind {
ExprKind::Array(members) => {
if members.is_empty() {
return None;
}

members
.iter()
.map(|member| match &member.kind {
ExprKind::Lit(Lit {
kind: LitKind::Byte,
symbol,
..
}) => Some(symbol.as_str()),
_ => None,
})
.map(|maybe_quote| match maybe_quote {
Some("\"") => Some("\\\""),
Some("\\'") => Some("'"),
other => other,
})
.collect::<Option<String>>()
},
_ => None,
}
if let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, expr) = &expr.kind
&& let ExprKind::Array(members) = &expr.kind
&& !members.is_empty()
{
members
.iter()
.map(|member| match &member.kind {
ExprKind::Lit(Lit {
kind: LitKind::Byte,
symbol,
..
}) => Some(symbol.as_str()),
_ => None,
})
.map(|maybe_quote| match maybe_quote {
Some("\"") => Some("\\\""),
Some("\\'") => Some("'"),
other => other,
})
.collect::<Option<String>>()
} else {
None
}
Expand Down
3 changes: 2 additions & 1 deletion src/tools/clippy/clippy_lints/src/declared_lints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ pub static LINTS: &[&::declare_clippy_lint::LintInfo] = &[
crate::doc::DOC_MARKDOWN_INFO,
crate::doc::DOC_NESTED_REFDEFS_INFO,
crate::doc::DOC_OVERINDENTED_LIST_ITEMS_INFO,
crate::doc::DOC_PARAGRAPHS_MISSING_PUNCTUATION_INFO,
crate::doc::DOC_SUSPICIOUS_FOOTNOTES_INFO,
crate::doc::EMPTY_DOCS_INFO,
crate::doc::MISSING_ERRORS_DOC_INFO,
Expand Down Expand Up @@ -777,7 +778,7 @@ pub static LINTS: &[&::declare_clippy_lint::LintInfo] = &[
crate::use_self::USE_SELF_INFO,
crate::useless_concat::USELESS_CONCAT_INFO,
crate::useless_conversion::USELESS_CONVERSION_INFO,
crate::vec::USELESS_VEC_INFO,
crate::useless_vec::USELESS_VEC_INFO,
crate::vec_init_then_push::VEC_INIT_THEN_PUSH_INFO,
crate::visibility::NEEDLESS_PUB_SELF_INFO,
crate::visibility::PUB_WITHOUT_SHORTHAND_INFO,
Expand Down
Loading
Loading