Skip to content

Conversation

A4-Tacks
Copy link
Contributor

@A4-Tacks A4-Tacks commented Sep 3, 2025

Example

fn main() {
    {
        let it = core::iter::repeat(92);
        it.$0for_each(|param| match param {
            (x, y) => println!("x: {}, y: {}", x, y),
        });
    }
}

Before this PR:

fn main() {
    {
        let it = core::iter::repeat(92);
        for param in it {
            match param {
                    (x, y) => println!("x: {}, y: {}", x, y),
                }
        }
    }
}

After this PR:

fn main() {
    {
        let it = core::iter::repeat(92);
        for param in it {
            match param {
                (x, y) => println!("x: {}, y: {}", x, y),
            }
        }
    }
}

Example
---
```rust
fn main() {
    {
        let it = core::iter::repeat(92);
        it.$0for_each(|param| match param {
            (x, y) => println!("x: {}, y: {}", x, y),
        });
    }
}
```

**Before this PR**:

```rust
fn main() {
    {
        let it = core::iter::repeat(92);
        for param in it {
            match param {
                    (x, y) => println!("x: {}, y: {}", x, y),
                }
        }
    }
}
```

**After this PR**:

```rust
fn main() {
    {
        let it = core::iter::repeat(92);
        for param in it {
            match param {
                (x, y) => println!("x: {}, y: {}", x, y),
            }
        }
    }
}
```
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 3, 2025
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