Skip to content

Conversation

@A4-Tacks
Copy link
Member

@A4-Tacks A4-Tacks commented Nov 7, 2025

Example

fn main() {
    for$0 _ in 0..5 {
        break;
        continue;
    }
}

Before this PR

Assist not applicable

After this PR

fn main() {
    'l: for _ in 0..5 {
        break 'l;
        continue 'l;
    }
}

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 7, 2025
@A4-Tacks A4-Tacks mentioned this pull request Nov 19, 2025
41 tasks
@A4-Tacks A4-Tacks force-pushed the add-label-while-for branch from 546e2bf to cfbd307 Compare November 19, 2025 13:32
Example
---
```rust
fn main() {
    for$0 _ in 0..5 {
        break;
        continue;
    }
}
```

**Before this PR**

Assist not applicable

**After this PR**

```rust
fn main() {
    'l: for _ in 0..5 {
        break 'l;
        continue 'l;
    }
}
```
@A4-Tacks A4-Tacks force-pushed the add-label-while-for branch from cfbd307 to 9722385 Compare November 19, 2025 13:33

impl HasAttrs for TypeOrConstParam {}

pub enum LoopLike {
Copy link
Member

Choose a reason for hiding this comment

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

We don;t need this I believe, we can use the AnyHasLoopBody node instead which should cover all loop types

Copy link
Member Author

Choose a reason for hiding this comment

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

Because loop_expr.loop_token() is needed, AnyHasLoopBody will be more inconvenient, or should I add methods to AnyHasLoopBody?

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.

3 participants