Skip to content

Conversation

A4-Tacks
Copy link
Contributor

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

Close #19817

fn foo() -> i32 {
    loop {
        $0
    }
}

Before this PR:

fn foo() -> i32 {
    loop {
        break;
    }
}

After this PR:

fn foo() -> i32 {
    loop {
        break $0;
    }
}

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 16, 2025
```rust
fn foo() -> i32 {
    loop {
        $0
    }
}
```

**Before this PR**:

```rust
fn foo() -> i32 {
    loop {
        break;
    }
}
```

**After this PR**:

```rust
fn foo() -> i32 {
    loop {
        break $0;
    }
}
```
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 14, 2025
Merged via the queue into rust-lang:master with commit 5e74dc1 Oct 14, 2025
15 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 14, 2025
@A4-Tacks A4-Tacks deleted the break-value branch October 14, 2025 09:23
@lnicola lnicola changed the title Add break value completion support fix: support break with value in completions Oct 14, 2025
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.

Completion break value in loop

3 participants