Skip to content

fix: add semicolon for postfix format unit like snippets#21955

Open
A4-Tacks wants to merge 1 commit intorust-lang:masterfrom
A4-Tacks:postfix-format-semi
Open

fix: add semicolon for postfix format unit like snippets#21955
A4-Tacks wants to merge 1 commit intorust-lang:masterfrom
A4-Tacks:postfix-format-semi

Conversation

@A4-Tacks
Copy link
Copy Markdown
Member

@A4-Tacks A4-Tacks commented Apr 4, 2026

Example

fn main() {
    "{ 2+2 } { SomeStruct { val: 1, other: 32 } :?}".println
}

Before this PR

fn main() {
    println!("{} {:?}", 2 + 2, SomeStruct { val: 1, other: 32 })
}

After this PR

fn main() {
    println!("{} {:?}", 2 + 2, SomeStruct { val: 1, other: 32 });
}

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 4, 2026
Example
---
```rust
fn main() {
    "{ 2+2 } { SomeStruct { val: 1, other: 32 } :?}".println
}
```

**Before this PR**

```rust
fn main() {
    println!("{} {:?}", 2 + 2, SomeStruct { val: 1, other: 32 })
}
```

**After this PR**

```rust
fn main() {
    println!("{} {:?}", 2 + 2, SomeStruct { val: 1, other: 32 });
}
```
@A4-Tacks A4-Tacks force-pushed the postfix-format-semi branch from eba3543 to 42cffd3 Compare April 4, 2026 13:45
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