rust/clippy_lints
bors c3948d16b9 Auto merge of #12549 - granddaifuku:fix/suspicious_else_formatting-false-positive-when-commented-else, r=Alexendoo
fix: `suspicious_else_formatting` false positive when else is included …

This PR addresses an issue where invalid suggestions are generated for `if-else` formatting if comments contain the keyword `else`.

The root of the problem is identified [here](95c62ffae9/clippy_lints/src/formatting.rs (L217)). Specifically, when a comment contains the word `else`, the lint mistakenly interprets it as part of an `if-else` clause. This misinterpretation leads to an incorrect splitting of the snippet, resulting in erroneous suggestions.

fixes: #12497

changelog: [`suspicious_else_formatting`]: Fixes invalid suggestions when comments include word else
2024-03-25 16:51:43 +00:00
..
src Auto merge of #12549 - granddaifuku:fix/suspicious_else_formatting-false-positive-when-commented-else, r=Alexendoo 2024-03-25 16:51:43 +00:00
Cargo.toml Bump Clippy version -> 0.1.79 2024-03-21 22:06:41 +01:00
README.md

This crate contains Clippy lints. For the main crate, check GitHub.