Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix to_string_in_format_args in parens #9590

Merged
merged 1 commit into from
Oct 12, 2022
Merged

Conversation

nyurik
Copy link
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

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
Contributor Author

nyurik commented Oct 4, 2022

r? @Alexendoo

@bors
Copy link
Contributor

bors commented Oct 4, 2022

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

tests/ui/format_args.rs Outdated Show resolved Hide resolved
@nyurik
Copy link
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
Member

Thanks!

@bors r+

@bors
Copy link
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
Contributor

bors commented Oct 12, 2022

⌛ Testing commit 7717904 with merge 42bdfa2...

@bors
Copy link
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