mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-15 09:27:27 +00:00
7409880a07
11061: Support "move if to guard" for if else chains r=weirane a=weirane The idea is to first parse the if else chain into a vector of `(Condition, BlockExpr)`s until we reach an iflet branch, an else branch, or the end (the tail). Then add the match arms with guard for the vector, and add the tail with no if guard. Because the whole original match arm is replaced and the generated code doesn't have redundent commas, I removed redundent commas in some test cases. Closes #11033. Co-authored-by: Wang Ruochen <wrc@ruo-chen.wang> |
||
---|---|---|
.. | ||
handlers | ||
tests | ||
utils | ||
assist_config.rs | ||
assist_context.rs | ||
lib.rs | ||
tests.rs | ||
utils.rs |