Skip to content

Conversation

@A4-Tacks
Copy link
Member

  • And migrate edit_in_place::Indent into edit::AstNodeEdit

Example

enum E<T> { X(T), Y(T) }

fn main() {
    $0let x = E::X(92);
    let y = x;$0
    let _ = ();
}

Before this PR

enum E<T> { X(T), Y(T) }

fn main() {
    if let x = E::X(92) {
    }
    let y = x;
    let _ = ();
}

After this PR

enum E<T> { X(T), Y(T) }

fn main() {
    if let x = E::X(92) {
        let y = x;
    }
    let _ = ();
}

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 26, 2025
- And migrate `edit_in_place::Indent` into `edit::AstNodeEdit`

Example
---
```rust
enum E<T> { X(T), Y(T) }

fn main() {
    $0let x = E::X(92);
    let y = x;$0
    let _ = ();
}
```

**Before this PR**

```
enum E<T> { X(T), Y(T) }

fn main() {
    if let x = E::X(92) {
    }
    let y = x;
    let _ = ();
}
```

**After this PR**

```rust
enum E<T> { X(T), Y(T) }

fn main() {
    if let x = E::X(92) {
        let y = x;
    }
    let _ = ();
}
```
@A4-Tacks A4-Tacks force-pushed the replace-let-with-iflet-stmts branch from 4e6476d to faf4350 Compare December 26, 2025 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants