Commit graph

10 commits

Author SHA1 Message Date
Samuel Tardieu
a1bdc191ba Reinstate single_match/single_match_else lints with comments
Commit efe3fe9b8c removed the ability for
`single_match` and `single_match_else` to trigger if comments were
present outside of the arms, as those comments would be lost while
rewriting the `match` expression.

This reinstates the lint, but prevents the suggestion from being applied
automatically in the presence of comments by using the `MaybeIncorrect`
applicability. Also, a note is added to the lint message to warn the
user about the need to preserve the comments if acting upon the
suggestion.
2025-03-17 16:14:14 +01:00
Guillaume Gomez
f666fd6417 Update UI tests 2025-02-15 13:38:16 +01:00
WeiTheShinobi
e3ca249e96
fix single_match suggestion 2024-09-06 23:10:42 +08:00
WeiTheShinobi
04d70d04fc
[single_match, single_match_else] fix suggestion when match irrefutable 2024-08-31 05:25:59 +08:00
Nadrieril
917ad034cc Fixes in various places 2024-08-10 12:08:46 +02:00
Philipp Krones
0e62b18435 Merge commit '9d6f41691e' into clippy-subtree-update 2024-03-21 22:20:40 +01:00
Philipp Krones
7e83df4068 Merge commit '93f0a9a91f' into clippy-subtree-update 2024-03-07 17:19:29 +01:00
Philipp Krones
cc61aeea54 Merge commit '080b587854' into clippyup 2023-08-24 21:32:12 +02:00
Philipp Krones
cb3ecf7b79 Merge commit '37f4c1725d' into clippyup 2023-07-02 14:59:02 +02:00
Philipp Krones
e6dc0efc00 Merge commit '30448e8cf9' into clippyup 2023-06-02 11:41:57 +02:00