Commit 01d7b58
committed
Fix not fill guarded match arm for add_missing_match_arms
Example
---
```rust
enum Foo { A, B }
fn main() {
match Foo::A {
Foo::A if false => todo!(),
}
}
```
**Before this PR**
```rust
enum Foo { A, B }
fn main() {
match Foo::A {
Foo::A if false => todo!(),
Foo::B => todo!(),
}
}
```
**After this PR**
```rust
enum Foo { A, B }
fn main() {
match Foo::A {
Foo::A if false => todo!(),
Foo::A => todo!(),
Foo::B => todo!(),
}
}
```1 parent 7c8955d commit 01d7b58
File tree
1 file changed
+4
-3
lines changed- src/tools/rust-analyzer/crates/ide-assists/src/handlers
1 file changed
+4
-3
lines changedLines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| |||
998 | 998 | | |
999 | 999 | | |
1000 | 1000 | | |
1001 | | - | |
| 1001 | + | |
| 1002 | + | |
1002 | 1003 | | |
1003 | 1004 | | |
1004 | 1005 | | |
| |||
0 commit comments