KEMBAR78
Fix extract_expressions_from_format_string on write! by A4-Tacks · Pull Request #20418 · rust-lang/rust-analyzer · GitHub
Skip to content

Conversation

@A4-Tacks
Copy link
Contributor

Input:

fn main() {
    write!(f, "{2+3}$0")
}

Old output:

fn main() {
    write!("{}"$0, 2+3)
}

This PR output:

fn main() {
    write!(f, "{}"$0, 2+3)
}

**Input**:

```rust
fn main() {
    write!(f, "{2+3}$0")
}
```

**Old output**:

```rust
fn main() {
    write!("{}"$0, 2+3)
}
```

**This PR output**:

```rust
fn main() {
    write!(f, "{}"$0, 2+3)
}
```
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 10, 2025
Copy link
Contributor

@ChayimFriedman2 ChayimFriedman2 left a comment

Choose a reason for hiding this comment

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

Thanks!

@ChayimFriedman2 ChayimFriedman2 added this pull request to the merge queue Aug 10, 2025
Merged via the queue into rust-lang:master with commit d307bc6 Aug 10, 2025
15 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 10, 2025
@A4-Tacks A4-Tacks deleted the fix-extract-expr-from-fmtstr-on-write branch August 10, 2025 07:22
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.

3 participants