Skip to content

Fix to_string_in_format_args in parens#9590

Merged
bors merged 1 commit into
rust-lang:masterfrom
nyurik:fix-parens
Oct 12, 2022
Merged

Fix to_string_in_format_args in parens#9590
bors merged 1 commit into
rust-lang:masterfrom
nyurik:fix-parens

Conversation

@nyurik
Copy link
Copy Markdown
Contributor

@nyurik nyurik commented Oct 4, 2022

Fix suggestions like

print!("error: something failed at {}", (Location::caller().to_string()));

where the parenthesis enclose some portion of the value.

Fixes #9540

changelog: [to_string_in_format_args]: fix incorrect fix when value is enclosed in parenthesis

@rust-highfive
Copy link
Copy Markdown

r? @Jarcho

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Oct 4, 2022
@nyurik
Copy link
Copy Markdown
Contributor Author

nyurik commented Oct 4, 2022

r? @Alexendoo

@bors
Copy link
Copy Markdown
Contributor

bors commented Oct 4, 2022

☔ The latest upstream changes (presumably #9547) made this pull request unmergeable. Please resolve the merge conflicts.

Comment thread tests/ui/format_args.rs Outdated
@nyurik
Copy link
Copy Markdown
Contributor Author

nyurik commented Oct 12, 2022

CC: @llogiq in case you want to look at this one too - similar to the format args one

Fix suggestions like

```
print!("error: something failed at {}", (Location::caller().to_string()));
```

where the parenthesis enclose some portion of the value.
@Alexendoo
Copy link
Copy Markdown
Member

Thanks!

@bors r+

@bors
Copy link
Copy Markdown
Contributor

bors commented Oct 12, 2022

📌 Commit 7717904 has been approved by Alexendoo

It is now in the queue for this repository.

@bors
Copy link
Copy Markdown
Contributor

bors commented Oct 12, 2022

⌛ Testing commit 7717904 with merge 42bdfa2...

@bors
Copy link
Copy Markdown
Contributor

bors commented Oct 12, 2022

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: Alexendoo
Pushing 42bdfa2 to master...

@bors bors merged commit 42bdfa2 into rust-lang:master Oct 12, 2022
@nyurik nyurik deleted the fix-parens branch October 13, 2022 00:22
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.

Incorrect fix for to_string_in_format_args

5 participants