Commit 6e89794
committed
Fix applicable on if-let-chain for invert_if
Example
---
```rust
fn f() { i$0f x && let Some(_) = Some(1) { 1 } else { 0 } }
```
**Before this PR**:
```rust
fn f() { if !(x && let Some(_) = Some(1)) { 0 } else { 1 } }
```
**After this PR**:
Assist not applicable1 parent 1393e63 commit 6e89794
File tree
2 files changed
+13
-4
lines changed- src/tools/rust-analyzer/crates
- ide-assists/src/handlers
- ide-db/src/syntax_helpers
2 files changed
+13
-4
lines changedLines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
127 | 139 | | |
128 | 140 | | |
129 | 141 | | |
| |||
Lines changed: 1 addition & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
| 268 | + | |
272 | 269 | | |
273 | 270 | | |
274 | 271 | | |
| |||
0 commit comments