Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clippy subtree update #131892

Merged
merged 136 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
136 commits
Select commit Hold shift + click to select a range
9f5bfe2
Implement lint for regex::Regex compilation inside a loop
GnomedDev Sep 21, 2024
b522e7a
Generate lint list in HTML directly instead of JS
GuillaumeGomez Aug 12, 2024
9661ba0
Update `cargo dev serve` command to look over the correct files
GuillaumeGomez Aug 13, 2024
0055ceb
Replace search with vanilla JS
GuillaumeGomez Aug 13, 2024
574e3dd
Finish porting lint functionalities to vanilla JS
GuillaumeGomez Aug 13, 2024
f2193c6
Completely remove angular and generate parts of settings in JS
GuillaumeGomez Aug 13, 2024
a235cbd
`module_name_repetitions`: don't warn if the item is in a private mod…
kpreid Sep 23, 2024
4997ee7
Turn declare_clippy_lint into a declarative macro
blyxyas Sep 5, 2024
0735031
Move tag removing to --explain
blyxyas Sep 25, 2024
daf730c
Add `sanitize_explanation`
blyxyas Sep 25, 2024
d232d09
Remove the `control_flow_enum` feature from clippy
scottmcm Sep 18, 2024
c8725f7
add proc macro check to needless_return
y21 Sep 26, 2024
55834a3
deal with differing syntax contexts for subexpressions in check_proc_…
y21 Sep 26, 2024
d1dec19
Add manual_ignore_cast_cmp lint
nyurik Sep 2, 2024
13e2633
Also sanitize configuration
blyxyas Oct 1, 2024
3ac3c34
Remove crashes and fix tests
compiler-errors Sep 30, 2024
ce22fd3
Remove redundant in_trait from hir::TyKind::OpaqueDef
compiler-errors Oct 3, 2024
cbd64a4
Use named fields for OpaqueTyOrigin
compiler-errors Oct 3, 2024
2080634
Fix lint `manual_slice_size_calculation` when the slice is ref more t…
Coekjan Oct 2, 2024
aeb548a
Put back interactions with settings menus
GuillaumeGomez Aug 14, 2024
59ccebe
Support all filters except versions
GuillaumeGomez Aug 14, 2024
00c11df
Add support for version filtering
GuillaumeGomez Aug 14, 2024
4bb4cc6
Add support for URL arguments
GuillaumeGomez Aug 14, 2024
e0b0851
Support version filter URL parameters
GuillaumeGomez Aug 15, 2024
47f40d4
Improve rendering speed by moving settings generation after theme ren…
GuillaumeGomez Aug 15, 2024
d52b9aa
Move theme handling JS into its own file to make theme being applied …
GuillaumeGomez Aug 29, 2024
8a3d4e1
Replace rinja custom syntax with default syntax
GuillaumeGomez Aug 29, 2024
823c124
Move inlined CSS into `style.css`
GuillaumeGomez Aug 29, 2024
80eb9cf
Run syntax highlighting only when needed
GuillaumeGomez Aug 29, 2024
6039343
Greatly reduce generated HTML page size
GuillaumeGomez Aug 29, 2024
277c4e4
Merge commit 'aa0d551351a9c15d8a95fdb3e2946b505893dda8' into clippy-s…
flip1995 Oct 3, 2024
d6be597
Use SpanlessEq for in `trait_bounds` lints
y21 Oct 1, 2024
743623d
Rollup merge of #131183 - compiler-errors:opaque-ty-origin, r=estebank
matthiaskrgr Oct 3, 2024
a01975b
Auto merge of #13493 - y21:trait_duplication_in_bounds_fix, r=Manishe…
bors Oct 3, 2024
19d1358
print cause chain in `mutable_key_type`
y21 Oct 3, 2024
4b7c190
Fix large_stack_arrays triggering for static/constants
GnomedDev Oct 1, 2024
26994e2
Reduce default 'large array' threshold
GnomedDev Oct 1, 2024
995eb95
Fix TRAIT_METHODS being large const array
GnomedDev Oct 1, 2024
47b681d
Rollup merge of #130518 - scottmcm:stabilize-controlflow-extra, r=dto…
workingjubilee Oct 4, 2024
1a29a78
rm `ItemKind::OpaqueTy`
camelid Aug 10, 2024
8ad3e13
Adapt clippy.
cjgillot Aug 18, 2024
810bd5d
Bless clippy.
cjgillot Aug 25, 2024
7bac9cd
Rollup merge of #129517 - cjgillot:known-panic-array, r=pnkfelix
workingjubilee Oct 5, 2024
0b632ec
Handle `clippy` cases of `rustc::potential_query_instability` lint
ismailarilik Oct 5, 2024
a1beaa1
Auto merge of #129244 - cjgillot:opaque-hir, r=compiler-errors
bors Oct 5, 2024
7f390d6
move f16/f128 const fn under f16/f128 feature gate
RalfJung Oct 4, 2024
a0653c5
Rollup merge of #131256 - RalfJung:f16-f128-const, r=ibraheemdev
matthiaskrgr Oct 5, 2024
98b59a1
Add a Lint for Pointer to Integer Transmutes in Consts
veera-sivarajan Sep 22, 2024
196dbcf
Avoid linting for Regexes compiled in items defined in loops
GnomedDev Oct 5, 2024
9dd6820
lintcheck: bump futures* crates to 0.3.31
samueltardieu Oct 5, 2024
f173eb3
Auto merge of #13505 - samueltardieu:lintcheck-bump-futures, r=y21
bors Oct 5, 2024
753629b
Auto merge of #13412 - GnomedDev:regex-comp-in-loop, r=y21
bors Oct 5, 2024
846bd30
raw_strings: separate raw string detection from lint logic
samueltardieu Oct 5, 2024
0596a04
unused_result_ok: added in Clippy 1.82.0, not 1.70.0
samueltardieu Oct 5, 2024
d050730
Auto merge of #130540 - veera-sivarajan:fix-87525, r=estebank
bors Oct 6, 2024
2d2e8cc
Auto merge of #13485 - GnomedDev:reduce-large-threshold, r=xFrednet
bors Oct 6, 2024
f7aaecf
Auto merge of #13506 - samueltardieu:push-zyqvkwlswvkk, r=xFrednet
bors Oct 6, 2024
2226f16
Rename NestedMetaItem to MetaItemInner
codemountains Oct 4, 2024
af6816c
`infinite_loop`: do not defensively use `saturating_sub()`
samueltardieu Oct 6, 2024
1c9e5d0
Auto merge of #13513 - samueltardieu:push-zvvzytrovulq, r=y21
bors Oct 6, 2024
99ce411
`infinite_loop`: continuing an outer loop leaves the inner loop
samueltardieu Oct 6, 2024
121d3ab
Avoid another `&Lrc<..>` in a return value.
nnethercote Oct 7, 2024
65d941d
Auto merge of #131354 - matthiaskrgr:rollup-hprnng2, r=matthiaskrgr
bors Oct 7, 2024
b013e69
Auto merge of #13496 - y21:issue10619, r=Alexendoo
bors Oct 7, 2024
5e78c15
raw_strings: handle format template as well
samueltardieu Oct 5, 2024
36c31db
Apply updated needless_raw_strings to Clippy sources
samueltardieu Oct 5, 2024
9f7a090
rustc_tools_util: rerun when git commit changes
RalfJung Sep 1, 2024
eb6c346
rustc_tools_util: bump version
RalfJung Oct 7, 2024
65fdfb8
Update README and CHANGELOG
flip1995 Oct 7, 2024
fba7ea7
Bump rust-tools-util version in Clippy Cargo.toml
flip1995 Oct 7, 2024
6f4bf90
Auto merge of #13329 - RalfJung:git-commit-rerun, r=Alexendoo,flip1995
bors Oct 7, 2024
c038c30
Add sugar for &pin (const|mut) types
eholk Sep 20, 2024
d9c8d97
Auto merge of #13512 - samueltardieu:issue-13511, r=xFrednet
bors Oct 8, 2024
1f8f982
Auto merge of #13504 - samueltardieu:needless-raw-strings, r=Alexendoo
bors Oct 9, 2024
33018b4
Update version attribute for 1.81 lints
xFrednet Oct 9, 2024
731c473
Changelog for Clippy 1.82 :airplane:
xFrednet Oct 9, 2024
8c46c49
Improved wording of or_fun_call lint
Oct 10, 2024
8e60f14
Auto merge of #13464 - y21:issue13458, r=flip1995
bors Oct 10, 2024
806a9df
Auto merge of #13464 - y21:issue13458, r=flip1995
bors Oct 10, 2024
2acc0c3
Revert "Temporarily remove myself from reviewer rotation"
blyxyas Oct 10, 2024
5840f78
Auto merge of #13530 - blyxyas:back-from-burnout, r=blyxyas
bors Oct 10, 2024
2b86ffc
only emit `manual_c_str_literals` in >= edition2021
y21 Oct 10, 2024
cb19f23
Clean up const_float_classify leftovers
alex-semenyuk Oct 6, 2024
140a127
Fix span issue on `implicit_saturating_sub`
blyxyas Oct 10, 2024
87b4c1f
Fix large_stack_arrays triggering when nesting const items
GnomedDev Oct 10, 2024
14c05c9
Auto merge of #13533 - blyxyas:fix-implicit_saturating_sub, r=dswij
bors Oct 11, 2024
05f3793
Auto merge of #13534 - GnomedDev:fix-large-stack-arrays-nested-item, …
bors Oct 11, 2024
47903db
Auto merge of #13532 - y21:issue13531, r=Alexendoo
bors Oct 11, 2024
f5cc292
Auto merge of #131045 - compiler-errors:remove-unnamed_fields, r=wesl…
bors Oct 11, 2024
8125cd5
Auto merge of #13359 - blyxyas:declare_clippy_macro, r=Alexendoo
bors Oct 11, 2024
6f1def7
Auto merge of #13269 - GuillaumeGomez:rewrite-lints-page, r=Alexendoo
bors Oct 11, 2024
b85f632
Auto merge of #13528 - zvavybir:master, r=Alexendoo
bors Oct 11, 2024
42723dc
Mark unnecessary_first_then_check and byte_char_slices as Applicable
Manishearth Oct 11, 2024
48e98ec
Auto merge of #13537 - Manishearth:applicable, r=xFrednet
bors Oct 11, 2024
8b075fc
Move `clippy::module_name_repetitions` to `restriction` (from `pedant…
xFrednet Oct 12, 2024
2b562de
Fix suggestion with a less volatile approach
blyxyas Oct 11, 2024
55f6029
Auto merge of #13444 - kpreid:fix-8524-private-rep, r=blyxyas
bors Oct 12, 2024
b1c4684
Rollup merge of #131277 - ismailarilik:handle-potential-query-instabi…
matthiaskrgr Oct 12, 2024
3c43a60
Stabilize `const_option`
tgross35 Oct 1, 2024
ea48cf3
Rollup merge of #131120 - tgross35:stabilize-const_option, r=RalfJung
tgross35 Oct 13, 2024
c71f0be
Auto merge of #13334 - nyurik:ascii-str-eq, r=xFrednet
bors Oct 13, 2024
46a0770
Use correct std/core prefix in lint output
samueltardieu Sep 24, 2024
04849bd
Auto merge of #13510 - alex-semenyuk:cleanup_const_float_classify, r=…
bors Oct 13, 2024
ef1db3f
Check MethodCall/Call arg count earlier or at all
GnomedDev Oct 11, 2024
236751d
Auto merge of #13540 - GnomedDev:create-dir-single-arg, r=y21
bors Oct 13, 2024
f883e28
Auto merge of #13542 - blyxyas:fix-implicit_saturating_sub, r=y21
bors Oct 13, 2024
6a281e9
Auto merge of #13487 - Coekjan:fix-slice-size-calc-on-ref-ref, r=dswij
bors Oct 13, 2024
43e99e5
Auto merge of #13541 - xFrednet:0-module-name-rep, r=blyxyas
bors Oct 13, 2024
5a89436
Remove `ResultsCursor::contains`.
nnethercote Oct 10, 2024
f444012
Auto merge of #13454 - samueltardieu:push-ymnkzlqloptz, r=xFrednet
bors Oct 14, 2024
360d86e
Move trait bound modifiers into hir::PolyTraitRef
compiler-errors Oct 13, 2024
5aa3e11
Move trait bound modifiers into ast::PolyTraitRef
compiler-errors Oct 13, 2024
66359a7
Rollup merge of #130635 - eholk:pin-reborrow-sugar, r=compiler-errors
matthiaskrgr Oct 15, 2024
c16ba35
Auto merge of #131723 - matthiaskrgr:rollup-krcslig, r=matthiaskrgr
bors Oct 15, 2024
590fdfb
bump opener to sync with rust
klensy Oct 15, 2024
fcf4646
Move `too_long_first_doc_paragraph` to nursery
xFrednet Oct 15, 2024
7ce1eea
Auto merge of #13551 - xFrednet:12993-kindergarden, r=xFrednet
bors Oct 15, 2024
512ad86
Changelog: Update category for `too_long_first_doc_paragraph`
xFrednet Oct 15, 2024
42511a3
Add lint for unnecessary lifetime bounded &str return
GnomedDev Sep 13, 2024
b62d262
Use path_res instead of lowering hir::Ty to ty::Ty
GnomedDev Sep 17, 2024
1563ce5
Auto merge of #13550 - klensy:opener, r=flip1995
bors Oct 15, 2024
f328623
Auto merge of #13395 - GnomedDev:unnecessary-lit-bound, r=Manishearth
bors Oct 15, 2024
ac81f17
Change the category of `manual_is_power_of_two` to `pedantic`
SpriteOvO Oct 15, 2024
ddda954
Auto merge of #13553 - SpriteOvO:manual_is_power_of_two-change-catego…
bors Oct 15, 2024
b86a489
Fix link to source
ageorgou Oct 15, 2024
4863625
Correct typo in lint description
ageorgou Oct 15, 2024
c512a22
Auto merge of #131481 - nnethercote:rm-GenKillSet, r=cjgillot
bors Oct 16, 2024
ccb30bf
Auto merge of #13554 - ageorgou:doc-links, r=xFrednet
bors Oct 16, 2024
dae1be9
Auto merge of #13525 - xFrednet:changelog-1-82, r=dswij
bors Oct 17, 2024
224d1e3
Merge remote-tracking branch 'upstream/master' into rustup
flip1995 Oct 18, 2024
4d5eaa0
Bump Clippy version -> 0.1.84
flip1995 Oct 18, 2024
4b5d189
Bump nightly version -> 2024-10-18
flip1995 Oct 18, 2024
a109190
Auto merge of #13561 - flip1995:rustup, r=flip1995
bors Oct 18, 2024
849a19f
Merge commit 'a109190d7060236e655fc75533373fa274ec5343' into clippy-s…
flip1995 Oct 18, 2024
375ca8d
Update Cargo.lock
flip1995 Oct 18, 2024
cf918d5
Hotfix TRAIT_METHODS static->const
flip1995 Oct 18, 2024
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
46 changes: 11 additions & 35 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ dependencies = [
"cargo_metadata",
"directories",
"rustc-build-sysroot",
"rustc_tools_util 0.4.0",
"rustc_tools_util",
"rustc_version",
"serde",
"serde_json",
Expand Down Expand Up @@ -537,7 +537,7 @@ checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97"

[[package]]
name = "clippy"
version = "0.1.83"
version = "0.1.84"
dependencies = [
"anstream",
"cargo_metadata",
Expand All @@ -550,9 +550,11 @@ dependencies = [
"if_chain",
"itertools",
"parking_lot",
"pulldown-cmark 0.11.3",
"quote",
"regex",
"rustc_tools_util 0.3.0",
"rinja",
"rustc_tools_util",
"serde",
"serde_json",
"syn 2.0.79",
Expand All @@ -566,7 +568,7 @@ dependencies = [

[[package]]
name = "clippy_config"
version = "0.1.83"
version = "0.1.84"
dependencies = [
"itertools",
"serde",
Expand All @@ -582,20 +584,19 @@ dependencies = [
"clap",
"indoc",
"itertools",
"opener 0.6.1",
"opener",
"shell-escape",
"walkdir",
]

[[package]]
name = "clippy_lints"
version = "0.1.83"
version = "0.1.84"
dependencies = [
"arrayvec",
"cargo_metadata",
"clippy_config",
"clippy_utils",
"declare_clippy_lint",
"itertools",
"quine-mc_cluskey",
"regex",
Expand All @@ -613,7 +614,7 @@ dependencies = [

[[package]]
name = "clippy_utils"
version = "0.1.83"
version = "0.1.84"
dependencies = [
"arrayvec",
"clippy_config",
Expand Down Expand Up @@ -919,15 +920,6 @@ dependencies = [
"winapi",
]

[[package]]
name = "declare_clippy_lint"
version = "0.1.83"
dependencies = [
"itertools",
"quote",
"syn 2.0.79",
]

[[package]]
name = "deranged"
version = "0.3.11"
Expand Down Expand Up @@ -2163,7 +2155,7 @@ dependencies = [
"log",
"memchr",
"once_cell",
"opener 0.7.2",
"opener",
"pulldown-cmark 0.10.3",
"regex",
"serde",
Expand Down Expand Up @@ -2501,17 +2493,6 @@ dependencies = [
"stable_deref_trait",
]

[[package]]
name = "opener"
version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c62dcb6174f9cb326eac248f07e955d5d559c272730b6c03e396b443b562788"
dependencies = [
"bstr",
"normpath",
"winapi",
]

[[package]]
name = "opener"
version = "0.7.2"
Expand Down Expand Up @@ -2879,6 +2860,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "679341d22c78c6c649893cbd6c3278dcbe9fc4faa62fea3a9296ae2b50c14625"
dependencies = [
"bitflags 2.6.0",
"getopts",
"memchr",
"pulldown-cmark-escape 0.11.0",
"unicase",
Expand Down Expand Up @@ -4460,12 +4442,6 @@ dependencies = [
"tracing",
]

[[package]]
name = "rustc_tools_util"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ba09476327c4b70ccefb6180f046ef588c26a24cf5d269a9feba316eb4f029f"

[[package]]
name = "rustc_tools_util"
version = "0.4.0"
Expand Down
2 changes: 1 addition & 1 deletion src/tools/clippy/.github/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ rm -rf out/master/ || exit 0
echo "Making the docs for master"
mkdir out/master/
cp util/gh-pages/index.html out/master
cp util/gh-pages/theme.js out/master
cp util/gh-pages/script.js out/master
cp util/gh-pages/lints.json out/master
cp util/gh-pages/style.css out/master

if [[ -n $TAG_NAME ]]; then
Expand Down
1 change: 1 addition & 0 deletions src/tools/clippy/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ out

# gh pages docs
util/gh-pages/lints.json
util/gh-pages/index.html

# rustfmt backups
*.rs.bk
Expand Down
42 changes: 40 additions & 2 deletions src/tools/clippy/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,46 @@ document.

## Unreleased / Beta / In Rust Nightly

[b794b8e0...master](https://github.com/rust-lang/rust-clippy/compare/b794b8e0...master)
[0f8eabd6...master](https://github.com/rust-lang/rust-clippy/compare/0f8eabd6...master)

## Rust 1.82

Current stable, released 2024-10-17

[View all 108 merged pull requests](https://github.com/rust-lang/rust-clippy/pulls?q=merged%3A2024-07-11T20%3A12%3A07Z..2024-08-24T20%3A55%3A35Z+base%3Amaster)

### New Lints

* Added [`too_long_first_doc_paragraph`] to `nursery`
[#12993](https://github.com/rust-lang/rust-clippy/pull/12993)
* Added [`unused_result_ok`] to `restriction`
[#12150](https://github.com/rust-lang/rust-clippy/pull/12150)
* Added [`pathbuf_init_then_push`] to `restriction`
[#11700](https://github.com/rust-lang/rust-clippy/pull/11700)

### Enhancements

* [`explicit_iter_loop`]: Now respects the `msrv` configuration
[#13288](https://github.com/rust-lang/rust-clippy/pull/13288)
* [`assigning_clones`]: No longer lints in test code
[#13273](https://github.com/rust-lang/rust-clippy/pull/13273)
* [`inconsistent_struct_constructor`]: Lint attributes now work on the struct definition
[#13211](https://github.com/rust-lang/rust-clippy/pull/13211)
* [`set_contains_or_insert`]: Now also checks for `BTreeSet`
[#13053](https://github.com/rust-lang/rust-clippy/pull/13053)
* [`doc_markdown`]: Added the following identifiers to [`doc-valid-idents`]: AccessKit,
CoreFoundation, CoreGraphics, CoreText, Direct2D, Direct3D, DirectWrite, PostScript,
OpenAL, OpenType, WebRTC, WebSocket, WebTransport, NetBSD, and OpenBSD
[#13093](https://github.com/rust-lang/rust-clippy/pull/13093)

### ICE Fixes

* [`uninit_vec`]
[rust#128720](https://github.com/rust-lang/rust/pull/128720)

## Rust 1.81

Current stable, released 2024-09-05
Released 2024-09-05

### New Lints

Expand Down Expand Up @@ -5621,6 +5656,7 @@ Released 2018-09-13
[`manual_find_map`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_find_map
[`manual_flatten`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten
[`manual_hash_one`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_hash_one
[`manual_ignore_case_cmp`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_ignore_case_cmp
[`manual_inspect`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_inspect
[`manual_instant_elapsed`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_instant_elapsed
[`manual_is_ascii_check`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_ascii_check
Expand Down Expand Up @@ -5874,6 +5910,7 @@ Released 2018-09-13
[`ref_option`]: https://rust-lang.github.io/rust-clippy/master/index.html#ref_option
[`ref_option_ref`]: https://rust-lang.github.io/rust-clippy/master/index.html#ref_option_ref
[`ref_patterns`]: https://rust-lang.github.io/rust-clippy/master/index.html#ref_patterns
[`regex_creation_in_loops`]: https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops
[`regex_macro`]: https://rust-lang.github.io/rust-clippy/master/index.html#regex_macro
[`renamed_function_params`]: https://rust-lang.github.io/rust-clippy/master/index.html#renamed_function_params
[`repeat_once`]: https://rust-lang.github.io/rust-clippy/master/index.html#repeat_once
Expand Down Expand Up @@ -6027,6 +6064,7 @@ Released 2018-09-13
[`unnecessary_get_then_check`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check
[`unnecessary_join`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_join
[`unnecessary_lazy_evaluations`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
[`unnecessary_literal_bound`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_literal_bound
[`unnecessary_literal_unwrap`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_literal_unwrap
[`unnecessary_map_on_constructor`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_on_constructor
[`unnecessary_min_or_max`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_min_or_max
Expand Down
8 changes: 5 additions & 3 deletions src/tools/clippy/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "clippy"
version = "0.1.83"
version = "0.1.84"
description = "A bunch of helpful lints to avoid common pitfalls in Rust"
repository = "https://github.com/rust-lang/rust-clippy"
readme = "README.md"
Expand All @@ -23,7 +23,7 @@ path = "src/driver.rs"
[dependencies]
clippy_config = { path = "clippy_config" }
clippy_lints = { path = "clippy_lints" }
rustc_tools_util = "0.3.0"
rustc_tools_util = "0.4.0"
tempfile = { version = "3.3", optional = true }
termize = "0.1"
color-print = "0.3.4"
Expand All @@ -39,6 +39,8 @@ toml = "0.7.3"
walkdir = "2.3"
filetime = "0.2.9"
itertools = "0.12"
pulldown-cmark = "0.11"
rinja = { version = "0.3", default-features = false, features = ["config"] }

# UI test dependencies
clippy_utils = { path = "clippy_utils" }
Expand All @@ -50,7 +52,7 @@ parking_lot = "0.12"
tokio = { version = "1", features = ["io-util"] }

[build-dependencies]
rustc_tools_util = "0.3.0"
rustc_tools_util = "0.4.0"

[features]
integration = ["tempfile"]
Expand Down
2 changes: 1 addition & 1 deletion src/tools/clippy/book/src/lint_configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ arithmetic-side-effects-allowed-unary = ["SomeType", "AnotherType"]
## `array-size-threshold`
The maximum allowed size for arrays on the stack

**Default Value:** `512000`
**Default Value:** `16384`

---
**Affected lints:**
Expand Down
2 changes: 1 addition & 1 deletion src/tools/clippy/clippy_config/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "clippy_config"
version = "0.1.83"
version = "0.1.84"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
26 changes: 25 additions & 1 deletion src/tools/clippy/clippy_config/src/conf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,30 @@ impl ConfError {
}
}

// Remove code tags and code behind '# 's, as they are not needed for the lint docs and --explain
pub fn sanitize_explanation(raw_docs: &str) -> String {
// Remove tags and hidden code:
let mut explanation = String::with_capacity(128);
let mut in_code = false;
for line in raw_docs.lines().map(str::trim) {
if let Some(lang) = line.strip_prefix("```") {
let tag = lang.split_once(',').map_or(lang, |(left, _)| left);
if !in_code && matches!(tag, "" | "rust" | "ignore" | "should_panic" | "no_run" | "compile_fail") {
explanation += "```rust\n";
} else {
explanation += line;
explanation.push('\n');
}
in_code = !in_code;
} else if !(in_code && line.starts_with("# ")) {
explanation += line;
explanation.push('\n');
}
}

explanation
}

macro_rules! wrap_option {
() => {
None
Expand Down Expand Up @@ -366,7 +390,7 @@ define_Conf! {
arithmetic_side_effects_allowed_unary: Vec<String> = <_>::default(),
/// The maximum allowed size for arrays on the stack
#[lints(large_const_arrays, large_stack_arrays)]
array_size_threshold: u64 = 512_000,
array_size_threshold: u64 = 16 * 1024,
/// Suppress lints whenever the suggested change would cause breakage for other crates.
#[lints(
box_collection,
Expand Down
2 changes: 1 addition & 1 deletion src/tools/clippy/clippy_config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ mod metadata;
pub mod msrvs;
pub mod types;

pub use conf::{Conf, get_configuration_metadata, lookup_conf_file};
pub use conf::{Conf, get_configuration_metadata, lookup_conf_file, sanitize_explanation};
pub use metadata::ClippyConfiguration;
3 changes: 1 addition & 2 deletions src/tools/clippy/clippy_config/src/msrvs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ macro_rules! msrv_aliases {

// names may refer to stabilized feature flags or library items
msrv_aliases! {
1,83,0 { CONST_EXTERN_FN }
1,83,0 { CONST_FLOAT_BITS_CONV }
1,83,0 { CONST_EXTERN_FN, CONST_FLOAT_BITS_CONV, CONST_FLOAT_CLASSIFY }
1,82,0 { IS_NONE_OR }
1,81,0 { LINT_REASONS_STABILIZATION }
1,80,0 { BOX_INTO_ITER}
Expand Down
2 changes: 1 addition & 1 deletion src/tools/clippy/clippy_dev/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ aho-corasick = "1.0"
clap = { version = "4.4", features = ["derive"] }
indoc = "1.0"
itertools = "0.12"
opener = "0.6"
opener = "0.7"
shell-escape = "0.1"
walkdir = "2.3"

Expand Down
Loading
Loading