Skip to content

Conversation

@A4-Tacks
Copy link
Member

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

Fixes #20987

Example

fn foo() {}
fn baz(_: impl FnOnce()) {}
fn bar() {
    baz(fo$0);
}

Before this PR

fn foo() {}
fn baz(_: impl FnOnce()) {}
fn bar() {
    baz(foo();$0);
}

After this PR

fn foo() {}
fn baz(_: impl FnOnce()) {}
fn bar() {
    baz(foo()$0);
}

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 13, 2025
@A4-Tacks A4-Tacks force-pushed the no-semicolon-in-arg-list branch from 8fdac80 to b55c904 Compare November 13, 2025 11:13
Example
---
```rust
fn foo() {}
fn baz(_: impl FnOnce()) {}
fn bar() {
    baz(fo$0);
}
```

**Before this PR**

```rust
fn foo() {}
fn baz(_: impl FnOnce()) {}
fn bar() {
    baz(foo();$0);
}
```

**After this PR**

```rust
fn foo() {}
fn baz(_: impl FnOnce()) {}
fn bar() {
    baz(foo()$0);
}
```
@A4-Tacks A4-Tacks force-pushed the no-semicolon-in-arg-list branch from b55c904 to 7890856 Compare November 13, 2025 11:26
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.

Completing a function with return type () inserts a semicolon even when in an expression

2 participants