diff options
| author | bors <bors@rust-lang.org> | 2024-03-25 16:51:43 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-03-25 16:51:43 +0000 |
| commit | c3948d16b928616407f1eac19bfea9ba9e2df16e (patch) | |
| tree | 780e0ff9e5b6025749b3f46fe66e933f0ca2508a /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | be27f68d26042408b705dd00bce414966000cadc (diff) | |
| parent | b9da637655c4e1c66dde2fb291ae4786b2b7e057 (diff) | |
| download | rust-c3948d16b928616407f1eac19bfea9ba9e2df16e.tar.gz rust-c3948d16b928616407f1eac19bfea9ba9e2df16e.zip | |
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](https://github.com/rust-lang/rust-clippy/blob/95c62ffae9bbce793f68a6f1473e3fc24af19bdd/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
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
