Skip to content

Clippy subtree update #134788

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

Merged
merged 171 commits into from
Dec 26, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
171 commits
Select commit Hold shift + click to select a range
d1cab08
Fix `shadow_unrelated`'s behaviour with closures
DJMcNab Nov 12, 2024
febe549
Fix needless_match FP on if-lets
blyxyas Nov 2, 2024
cd7cec9
Add new `literal_string_with_formatting_arg` lint
GuillaumeGomez Sep 17, 2024
922aabe
Add regression test for `literal_string_with_formatting_arg`
GuillaumeGomez Sep 17, 2024
05705b6
Update new failing tests
GuillaumeGomez Sep 18, 2024
8d5a4e9
Allow `literal_string_with_formatting_arg` in some clippy crates
GuillaumeGomez Sep 19, 2024
9ea769a
Disable checks on `{}`
GuillaumeGomez Sep 19, 2024
b20b75a
Don't emit if literal comes from macro expansion
GuillaumeGomez Sep 19, 2024
607a3f6
Rename `literal_string_with_formatting_arg` into `literal_string_with…
GuillaumeGomez Nov 19, 2024
cfc6444
Limit `literal_string_with_formatting_args` to known variables if no …
GuillaumeGomez Nov 19, 2024
3a7a185
cover guard patterns in clippy lints
max-niederman Oct 6, 2024
44feca7
doc_nested_refdefs: new lint for suspicious refdef syntax
notriddle Nov 19, 2024
8dd45f1
doc_nested_refdefs: apply suggestions
notriddle Nov 27, 2024
66e212b
Extend `precedence` for bitmasking and shift
Natsume-Neko Nov 28, 2024
d58b911
Merge commit 'ff4a26d442bead94a4c96fb1de967374bc4fbd8e' into clippy-s…
flip1995 Nov 28, 2024
8de6e86
Stop using `HybridBitSet` in clippy.
nnethercote Nov 25, 2024
f5f2c51
Update backport, release and sync documentation
flip1995 Nov 17, 2024
af1f78a
Update backport, release and sync documentation (#13700)
flip1995 Nov 29, 2024
1e88cf4
Auto merge of #133588 - flip1995:clippy-subtree-update, r=Manishearth
bors Nov 29, 2024
21115b3
refactor(utils): move top-level files to `mod.rs` when applicable
BD103 Nov 26, 2024
1329547
add targetted help messages to `zombie_processes` diagnostic
y21 Nov 29, 2024
120b841
Modified the tests so that if we place wrong parentheses we will get …
Natsume-Neko Nov 30, 2024
650e0c8
Fix `shadow_unrelated`'s behaviour with closures (#13677)
Jarcho Nov 30, 2024
a6a6936
Remove hir::ArrayLen, introduce ConstArgKind::Infer
voidc Nov 28, 2024
ce9c4f8
Mention `string_slice` in `indexing_slicing` documentation
samueltardieu Nov 30, 2024
9a692ec
Add more cases to the `useless_conversion` lint
samueltardieu Nov 29, 2024
2b0e7bb
Fix lifetimes elision suggestion in where clauses
samueltardieu Nov 29, 2024
736d114
Extract lint namespace and lint name from the meta item
samueltardieu Nov 30, 2024
092bfef
Do not mark attributes with unknown namespace as useless
samueltardieu Nov 30, 2024
c52fe8b
Eliminate magic numbers from expression precedence
dtolnay Nov 28, 2024
1f966e9
Add new `literal_string_with_formatting_args` lint (#13410)
xFrednet Dec 1, 2024
0a1ba2c
Mention `string_slice` in `indexing_slicing` documentation (#13763)
y21 Dec 1, 2024
92badb3
`typing_env_env_for_derived_eq` -> `typing_env_for_derived_eq`
smoelius Dec 1, 2024
278e316
Fix needless_match FP on if-lets (#13646)
Centri3 Dec 2, 2024
5e799b2
Rollup merge of #133589 - voidc:remove-array-len, r=boxyuwu
jhpratt Dec 2, 2024
5082adf
Change `AttrArgs::Eq` into a struct variant
oli-obk Dec 2, 2024
b330d96
remove `Ty::is_copy_modulo_regions`
lcnr Dec 2, 2024
ab5d55c
Add more receivers to `useless_conversion`
samueltardieu Nov 30, 2024
0a07dc5
`typing_env_env_for_derived_eq` -> `typing_env_for_derived_eq` (#13769)
Jarcho Dec 2, 2024
2ddfc92
Add more cases to the `useless_conversion` lint (#13756)
blyxyas Dec 2, 2024
e66bd97
Rollup merge of #133603 - dtolnay:precedence, r=lcnr
GuillaumeGomez Dec 2, 2024
a0a948d
Rollup merge of #133751 - lcnr:no-trait-solving-on-type, r=compiler-e…
GuillaumeGomez Dec 2, 2024
c8d800e
Drop uplifted `clippy::fn_address_comparisons`
Urgau Dec 10, 2023
74dd50c
Fix lifetimes elision suggestion in where clauses (#13752)
Manishearth Dec 2, 2024
df46e4c
add targeted help messages to `zombie_processes` diagnostic (#13760)
Manishearth Dec 2, 2024
66b15ad
doc_nested_refdefs: new lint for suspicious list syntax (#13707)
Jarcho Dec 2, 2024
4a342df
Correct `report_elidable_impl_lifetimes` comment following #13752
smoelius Dec 2, 2024
646d72a
Correct `report_elidable_impl_lifetimes` comment following #13752 (#1…
blyxyas Dec 2, 2024
f850d15
Rollup merge of #133746 - oli-obk:push-xwyrylxmrtvq, r=jieyouxu
GuillaumeGomez Dec 2, 2024
d3a7fb1
doc_lazy_continuation: Correctly count indent with backslashes
notriddle Nov 28, 2024
ec24388
let_unit_value: Use multipart suggestions
scottgerring Dec 3, 2024
e493664
index_refutable_slice: use multipart suggestions
scottgerring Dec 3, 2024
19426bf
doc_lazy_continuation: Correctly count indent with backslashes (#13742)
Jarcho Dec 3, 2024
2550530
Extend `precedence` for bitmasking and shift (#13743)
Jarcho Dec 3, 2024
7cc19d7
Rollup merge of #118833 - Urgau:lint_function_pointer_comparisons, r=…
fmease Dec 5, 2024
c8b10ac
fix the order of emitting `ref_as_ptr` and `borrow_as_ptr`
cyrgani Dec 5, 2024
9925f99
update `borrow_as_ptr` to suggest `&raw` when the MSRV allows it
cyrgani Dec 5, 2024
a5e46a6
update `borrow_as_ptr` to suggest `&raw` syntax (#13689)
Jarcho Dec 5, 2024
4907940
fix: various typos
BD103 Dec 4, 2024
f83a227
Fix various typos (#13785)
blyxyas Dec 5, 2024
c963e22
chore: use multipart_suggestions for manual_async_fn
scottgerring Dec 6, 2024
dcc4025
chore: use multipart_suggestions for str_splitn
scottgerring Dec 6, 2024
63e4979
Remove all threading through of ErrorGuaranteed from the driver
bjorn3 Nov 3, 2024
1496711
new lint for `as *const _` and `as *mut _` casting
Soveu Aug 10, 2024
5198941
chore: use multipart_suggestions for str_splitn (#13789)
Jarcho Dec 6, 2024
7f866c7
New lint for `as *const _` and `as *mut _` pointer casts (#13251)
Jarcho Dec 6, 2024
0a99eec
Update known problems for default_numeric_fallback
Noratrieb Dec 7, 2024
cfee37d
Make `Copy` unsafe to implement for ADTs with `unsafe` fields
jswrenn Dec 6, 2024
d1e1aff
Update known problems for default_numeric_fallback (#13794)
Centri3 Dec 8, 2024
ec37eb6
Move top-level files to `mod.rs` when applicable (#13732)
llogiq Dec 8, 2024
c4aeb32
chore: use multipart_suggestions for manual_async_fn (#13788)
llogiq Dec 8, 2024
24ccb15
Rollup merge of #133424 - Nadrieril:guard-patterns-parsing, r=fee1-dead
matthiaskrgr Dec 8, 2024
69411e0
Better help message for comparison_chain lint
samueltardieu Nov 30, 2024
f51f72b
Detect shadowing in pattern field
samueltardieu Dec 8, 2024
dc71301
Auto merge of #134052 - matthiaskrgr:rollup-puxwqrk, r=matthiaskrgr
bors Dec 9, 2024
a9594c1
fix ICE on type error in promoted
RalfJung Dec 7, 2024
d5059d8
remove unnecessary notations
lapla-cogito Dec 9, 2024
7d1e0da
chore: use multipart_suggestions for match_same_arms
scottgerring Dec 9, 2024
6a3ef93
remove unnecessary notations (#13801)
Jarcho Dec 9, 2024
e767daa
indexing_slicing: Clarify documentation
Wilfred Dec 4, 2024
59392be
Introduce `default_field_values` feature
estebank Aug 24, 2024
6450014
Rollup merge of #134010 - RalfJung:promoted-type-error-ice, r=oli-obk
fmease Dec 10, 2024
ff0a96b
Rollup merge of #134008 - jswrenn:unsafe-fields-copy, r=compiler-errors
fmease Dec 10, 2024
1857833
Auto merge of #134125 - fmease:rollup-u38o3ob, r=fmease
bors Dec 10, 2024
a8d2960
Keep track of parse errors in `mod`s and don't emit resolve errors fo…
estebank Dec 5, 2024
2a28347
Fix: fixed multipart_suggestion in index_refutable_slice uitest (#13…
y21 Dec 10, 2024
f495cec
Remove more traces of anonymous ADTs
compiler-errors Dec 10, 2024
59740a8
Better help message for comparison_chain lint (#13762)
y21 Dec 10, 2024
c2d23ad
Detect shadowing in pattern field (#13797)
Jarcho Dec 11, 2024
1ace535
suggest modified code for if_not_else lint
lapla-cogito Dec 11, 2024
f865ada
Require the `constness` query to only be invoked on things that can h…
oli-obk Dec 10, 2024
b8cd513
allow needless_option_take to report for more cases
ericwu17 Nov 14, 2024
35f4b92
fix version attribute for arbitrary_source_item_ordering lint
lapla-cogito Dec 12, 2024
f2aed50
fix version attribute for `arbitrary_source_item_ordering` lint (#13819)
y21 Dec 12, 2024
db35e30
fix typo
klensy Dec 12, 2024
87af9d0
Fix tools
compiler-errors Dec 10, 2024
f4db5f7
Tweak multispan rendering
estebank Dec 11, 2024
cc9d9cc
Filter empty lines, comments and delimiters from previous to last mul…
estebank Dec 11, 2024
51ff984
Stabilize async closures
compiler-errors Nov 6, 2024
db7e453
chore: use multipart_suggestion in significant_drop_tightening lint
scottgerring Dec 13, 2024
efe3fe9
Fix `single_match` lint being emitted when it should not
GuillaumeGomez Nov 30, 2024
8a09650
Auto merge of #134122 - oli-obk:push-zqnyznxtpnll, r=petrochenkov
bors Dec 13, 2024
e2a0e38
Rollup merge of #133937 - estebank:silence-resolve-errors-from-mod-wi…
matthiaskrgr Dec 13, 2024
9ce2645
Rollup merge of #134140 - compiler-errors:unsafe-binders-ast, r=oli-obk
matthiaskrgr Dec 13, 2024
f3a8d4c
Rename ty_def_id so people will stop using it by accident
compiler-errors Dec 13, 2024
c607408
Fix `single_match` lint being emitted when it should not (#13765)
llogiq Dec 13, 2024
e38fa00
address wrong suggestions when using comparing with byte literal stri…
lapla-cogito Dec 13, 2024
13463cb
correct `single_match` lint suggestion (#13824)
blyxyas Dec 13, 2024
f33deb7
Account for `///` when rendering multiline spans
estebank Dec 13, 2024
695f938
Auto merge of #134269 - matthiaskrgr:rollup-fkshwux, r=matthiaskrgr
bors Dec 13, 2024
503f2bc
Rollup merge of #134181 - estebank:trim-render, r=oli-obk
matthiaskrgr Dec 14, 2024
70ebfbb
Rollup merge of #134265 - compiler-errors:ty_def_id, r=oli-obk
matthiaskrgr Dec 14, 2024
c9c62c4
(Re-)Implement impl_trait_in_bindings
compiler-errors Dec 11, 2024
bfb87b9
indexing_slicing: Clarify documentation (#13780)
dswij Dec 14, 2024
37f79d5
Auto merge of #134294 - matthiaskrgr:rollup-anh6io8, r=matthiaskrgr
bors Dec 14, 2024
25d004d
Auto merge of #134185 - compiler-errors:impl-trait-in-bindings, r=oli…
bors Dec 14, 2024
bd078ad
don't lint for creating an iterator from an empty array in filter_map…
lapla-cogito Dec 14, 2024
5ac1805
chore: use multipart_suggestion in significant_drop_tightening lint (…
xFrednet Dec 14, 2024
bc410fc
Stop handling specialization in clippy's to_string_trait_impl lint
bjorn3 Dec 14, 2024
6240710
allow needless_option_take to report for more cases (#13684)
Centri3 Dec 14, 2024
acf9177
Add some convenience helper methods on `hir::Safety`
oli-obk Dec 13, 2024
4cddd0e
Auto merge of #134258 - bjorn3:no_public_specialization, r=petrochenkov
bors Dec 15, 2024
6a92b85
Rollup merge of #134285 - oli-obk:push-vwrqsqlwnuxo, r=Urgau
Zalathar Dec 15, 2024
e7c27c6
correct suggestion for must_use_unit when there are multiple attributes
lapla-cogito Dec 15, 2024
12edfb8
Merge remote-tracking branch 'upstream/master' into rustup
flip1995 Dec 15, 2024
028d87b
Bump nightly version -> 2024-12-15
flip1995 Dec 15, 2024
1dddeab
Rustup (#13832)
flip1995 Dec 15, 2024
f1f1165
fix `must_use_unit` suggestion when there're multiple attributes (#13…
llogiq Dec 15, 2024
b8e569e
chore: use multipart_suggestions for match_same_arms (#13803)
blyxyas Dec 15, 2024
f332026
Rename `value` field to `expr` to simplify later commits' diffs
oli-obk Dec 2, 2024
6dfa37f
Add hir::Attribute
jdonszelmann Oct 16, 2024
7a80f7b
Initial impl `repr_packed_without_abi`
lukaslueg Sep 15, 2024
60dbda2
fix typo in `numeric_arithmetic` logic (#13820)
y21 Dec 15, 2024
4c0177c
Do not suggest using `Error` in `no_std` before Rust 1.81
samueltardieu Dec 15, 2024
8da8da8
Initial impl of `repr_packed_without_abi` (#13398)
Alexendoo Dec 16, 2024
968669b
Do not suggest using `Error` in `no_std` before Rust 1.81 (#13834)
llogiq Dec 16, 2024
1a23b5b
correct suggestion for unnecessary_sort_by in no_std
lapla-cogito Dec 16, 2024
063c5c1
correct suggestion for `unnecessary_sort_by` in `no_std` (#13836)
llogiq Dec 16, 2024
ad695da
Correctly handle string indices in `literal_string_with_formatting_arg`
GuillaumeGomez Dec 16, 2024
77c9ddd
Correctly handle string indices in `literal_string_with_formatting_ar…
flip1995 Dec 16, 2024
6f65a81
split attributes
jdonszelmann Dec 7, 2024
4d05825
rename rustc_attr to rustc_attr_parsing and create rustc_attr_data_st…
jdonszelmann Dec 13, 2024
81c0cf8
fix the team anchor in book
lapla-cogito Dec 17, 2024
0f9cc8d
Don't trigger `filter_map_identity` with an iterator from an empty ar…
Jarcho Dec 17, 2024
8fe39b2
Change unnecessary_iter_cloned to use multipart_suggestion
scottgerring Dec 17, 2024
f8da18c
Do not mark attributes with unknown namespace as useless (#13766)
flip1995 Dec 17, 2024
8ea395e
fix a broken anchor in the book (#13846)
flip1995 Dec 17, 2024
5c200c2
Simplify `RefTokenTreeCursor::look_ahead`.
nnethercote Dec 11, 2024
1cb4dca
Rename `RefTokenTreeCursor`.
nnethercote Dec 11, 2024
9f4941a
chore: starting to fix unnecessary_iter_cloned (#13848)
blyxyas Dec 17, 2024
550d36d
Rollup merge of #134161 - nnethercote:overhaul-token-cursors, r=spast…
jieyouxu Dec 18, 2024
f415510
introduce `LateParamRegionKind`
lcnr Dec 6, 2024
1e0b59d
Use multipart suggestion in unnecessary_to_owned
nanvel Dec 17, 2024
a775a1b
Use multipart suggestion in `unnecessary_to_owned` (#13847)
Manishearth Dec 19, 2024
54a396a
Auto merge of #133961 - lcnr:borrowck-cleanup, r=jackh726
bors Dec 19, 2024
6f6ddd2
Add allow-indexing-slicing-in-tests option
alex-semenyuk Dec 19, 2024
b3fadd5
Add allow-indexing-slicing-in-tests option (#13854)
llogiq Dec 19, 2024
c772140
Update clippy
scottmcm Dec 15, 2024
4d735d8
Begin to implement type system layer of unsafe binders
compiler-errors Dec 21, 2024
1f8ba33
Fix `has_iter_method` documentation
samueltardieu Dec 22, 2024
592fd34
Fix `has_iter_method` documentation (#13867)
y21 Dec 23, 2024
988042e
chore: multipart suggestions for let_unit_value lint (#13754)
blyxyas Dec 23, 2024
b5fe6ec
Auto merge of #134625 - compiler-errors:unsafe-binders-ty, r=oli-obk
bors Dec 24, 2024
887aa26
add more tests
lapla-cogito Dec 24, 2024
85b6094
auto-fix `if_not_else` (#13809)
llogiq Dec 24, 2024
b28bfbc
fix examples using Ty.kind()
lapla-cogito Dec 25, 2024
dff0294
fix examples using `Ty.kind()` in the book (#13875)
flip1995 Dec 26, 2024
14af404
Merge remote-tracking branch 'upstream/master' into rustup
flip1995 Dec 26, 2024
416f7e8
Bump nightly version -> 2024-12-26
flip1995 Dec 26, 2024
609cd31
Rustup (#13881)
flip1995 Dec 26, 2024
8a7d8ec
Merge commit '609cd310be44677ae31d452a17b0f8207e1abfe1' into clippy-s…
flip1995 Dec 26, 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
Prev Previous commit
Next Next commit
Account for /// when rendering multiline spans
Don't consider `///` and `//!` docstrings to be empty for the purposes of multiline span rendering.
  • Loading branch information
estebank committed Dec 13, 2024
commit f33deb7511087f0dbaa343dc92927e4ac20c52b9
4 changes: 3 additions & 1 deletion tests/ui/doc/unbalanced_ticks.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ error: backticks are unbalanced
|
LL | /// This is a doc comment with `unbalanced_tick marks and several words that
| _____^
... |
LL | |
LL | | /// should be `encompassed_by` tick marks because they `contain_underscores`.
LL | | /// Because of the initial `unbalanced_tick` pair, the error message is
LL | | /// very `confusing_and_misleading`.
| |____________________________________^
|
Expand Down
3 changes: 3 additions & 0 deletions tests/ui/empty_line_after/doc_comments.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ error: empty lines after doc comment
--> tests/ui/empty_line_after/doc_comments.rs:63:5
|
LL | / /// for OldA
LL | | // struct OldA;
LL | |
LL | | /// Docs
... |
LL | |
| |_^
Expand Down
14 changes: 10 additions & 4 deletions tests/ui/needless_doc_main.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ error: needless `fn main` in doctest
|
LL | /// fn main() {
| _____^
... |
LL | |
LL | |
LL | | /// unimplemented!();
LL | | /// }
| |_____^
|
Expand All @@ -15,7 +17,8 @@ error: needless `fn main` in doctest
|
LL | /// fn main() -> () {
| _____^
... |
LL | |
LL | | /// unimplemented!();
LL | | /// }
| |_____^

Expand All @@ -24,7 +27,8 @@ error: needless `fn main` in doctest
|
LL | /// fn main() {
| _____^
... |
LL | |
LL | | /// unimplemented!();
LL | | /// }
| |_____^

Expand All @@ -33,7 +37,9 @@ error: needless `fn main` in doctest
|
LL | /// // the fn is not always the first line
| _____^
... |
LL | |
LL | | /// fn main() {
LL | | /// unimplemented!();
LL | | /// }
| |_____^

Expand Down
9 changes: 7 additions & 2 deletions tests/ui/suspicious_doc_comments_unfixable.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ error: this is an outer doc comment and does not apply to the parent module or c
--> tests/ui/suspicious_doc_comments_unfixable.rs:4:1
|
LL | / ///! a
... |
LL | |
LL | |
LL | | ///! b
LL | | /// c
LL | | ///! d
| |______^
|
Expand All @@ -22,7 +25,9 @@ error: this is an outer doc comment and does not apply to the parent module or c
--> tests/ui/suspicious_doc_comments_unfixable.rs:12:1
|
LL | / ///! a
... |
LL | |
LL | | ///! b
LL | | /// c
LL | | ///! d
| |______^
|
Expand Down
4 changes: 3 additions & 1 deletion tests/ui/too_long_first_doc_paragraph-fix.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ error: first doc comment paragraph is too long
--> tests/ui/too_long_first_doc_paragraph-fix.rs:3:1
|
LL | / /// A very short summary.
... |
LL | | /// A much longer explanation that goes into a lot more detail about
LL | | /// how the thing works, possibly with doclinks and so one,
LL | | /// and probably spanning a many rows. Blablabla, it needs to be over
LL | | /// 200 characters so I needed to write something longeeeeeeer.
| |_^
|
Expand Down
7 changes: 5 additions & 2 deletions tests/ui/too_long_first_doc_paragraph.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ error: first doc comment paragraph is too long
--> tests/ui/too_long_first_doc_paragraph.rs:8:5
|
LL | / //! A very short summary.
... |
LL | | //! A much longer explanation that goes into a lot more detail about
LL | | //! how the thing works, possibly with doclinks and so one,
LL | | //! and probably spanning a many rows. Blablabla, it needs to be over
LL | | //! 200 characters so I needed to write something longeeeeeeer.
| |____^
|
Expand All @@ -27,7 +29,8 @@ error: first doc comment paragraph is too long
--> tests/ui/too_long_first_doc_paragraph.rs:36:1
|
LL | / /// Lorem
... |
LL | | /// ipsum dolor sit amet, consectetur adipiscing elit. Nunc turpis nunc, lacinia
LL | | /// a dolor in, pellentesque aliquet enim. Cras nec maximus sem. Mauris arcu libero,
LL | | /// gravida non lacinia at, rhoncus eu lacus.
| |_^

Expand Down