fix: don't add a second semicolon after postfix completions#21839
fix: don't add a second semicolon after postfix completions#21839ChayimFriedman2 merged 1 commit intorust-lang:masterfrom
Conversation
Make `.let` `.letm` `.return` `.break` not duplicate semicolons
Example
---
```rust
fn main() {
baz.l$0;
}
```
**Before this PR**
```rust
fn main() {
let $0 = baz;;
}
```
**After this PR**
```rust
fn main() {
let $0 = baz;
}
```
862f769 to
88a2710
Compare
Is it used for the skill of entering semicolons first and then |
|
AFAIK it inserts |
|
Are you referring to situations like This is quite difficult to handle. The expression snippets are relatively simple, so it's better to use |
|
No, I'm referring to e.g. typing |
|
Isn't this #21594? And the expression snippets are all hard coded short snippets, without perceiving the surrounding syntax tree, right |
|
#21594 was about the postfix snippet, which I'm unused to use, therefore I'm requesting you to do it for non-postfix snippets as well :) |
|
However, technically, non-postfix snippets (expressions snippets) are difficult to implement this |
Make
.let.letm.return.breaknot duplicate semicolonsExample
Before this PR
After this PR