Skip to content

Conversation

@A4-Tacks
Copy link
Member

  • And fix indent

Example

fn foo() {
    {
        match n {
            Some(n) $0=> foo(
                29,
                30,
            ),
            _ => ()
        };
    }
}

Before this PR:

fn main() {
    {
        match n {
            Some(n) => {
                foo(
                            29,
                            30,
                        )
            },
            _ => ()
        };
    }
}

After this PR:

fn foo() {
    {
        match n {
            Some(n) => {
                foo(
                    29,
                    30,
                )
            },
            _ => ()
        };
    }
}

- And fix indent

Example
---
```rust
fn foo() {
    {
        match n {
            Some(n) $0=> foo(
                29,
                30,
            ),
            _ => ()
        };
    }
}
```

**Before this PR**:

```rust
fn main() {
    {
        match n {
            Some(n) => {
                foo(
                            29,
                            30,
                        )
            },
            _ => ()
        };
    }
}
```

**After this PR**:

```rust
fn foo() {
    {
        match n {
            Some(n) => {
                foo(
                    29,
                    30,
                )
            },
            _ => ()
        };
    }
}
```
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 15, 2025
Copy link
Member

@ShoyuVanilla ShoyuVanilla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ShoyuVanilla ShoyuVanilla added this pull request to the merge queue Oct 19, 2025
Merged via the queue into rust-lang:master with commit c1b4b64 Oct 19, 2025
15 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 19, 2025
@A4-Tacks A4-Tacks deleted the migrate-add-braces branch October 19, 2025 17:15
@lnicola lnicola changed the title Migrate add_braces assist, because edit_in_place uses ted fix: fix indent in add_braces Oct 24, 2025
mendelsshop pushed a commit to mendelsshop/rust-analyzer that referenced this pull request Oct 27, 2025
Migrate `add_braces` assist, because edit_in_place uses ted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants