You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fnv1(a:bool,b:bool){if a {if b {todo!()}}}fnv2(a:bool,b:bool){if a {// commentif b {todo!()}}}fnv3(a:bool,b:bool){if a {if// comment
b {todo!()}}}fnv4(a:bool,b:bool){if a {if b
// comment{todo!()}}}
v1, v3, v4 trigger the collapsible_if lint with the suggestion
if a && b {todo!()}
Bug 1: It is inconsistent that v2 does not trigger the lint while v3, v4 do.
Bug 2: When automatically applying the suggestion in v3, v4 through clippy --fix the comment is removed. It is not acceptable for the suggestion to remove comments.
Summary
v1, v3, v4 trigger the collapsible_if lint with the suggestion
Bug 1: It is inconsistent that v2 does not trigger the lint while v3, v4 do.
Bug 2: When automatically applying the suggestion in v3, v4 through
clippy --fix
the comment is removed. It is not acceptable for the suggestion to remove comments.Reproducer
No response
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: