mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-25 20:43:21 +00:00
dbf869b4d2
1952: Create an assist for applying De Morgan's Law r=matklad a=cronokirby Fixes #1807 This assist can transform expressions of the form `!x || !y` into `!(x && y)`. This also works with `&&`. This assist will only trigger if the cursor is on the central logical operator. The main limitation of this current implementation is that both operands need to be an explicit negation, either of the form `!x`, or `x != y`. More operands could be accepted, but this would complicate the implementation quite a bit. Co-authored-by: Lúcás Meier <cronokirby@gmail.com> |
||
---|---|---|
.. | ||
dev | ||
user |