-
Notifications
You must be signed in to change notification settings - Fork 925
Double quotes in specific positions cause string formatting errors #6315
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
Comments
@ytmimi PTAL |
PTAL? |
I mean that can you please take a look? |
@waruto210 what version of rustfmt are you using, and what configuration options are you setting? |
To reproduce:
max_width = 100
format_strings = true I have also changed the toolchain to some earlier versions,such as |
You shouldn't need to update the toolchain version. rustfmt is pinned to specific nightly toolchain. The issue is most likely a bug with |
Did some digging. This is a duplicate of #5138 |
If we set
max_width = 100
, and a double quote in the string appears at Col 100 during the formatting process, this double quote will be moved to the next line, causing a syntax error.After formatting, the code becomes:
The text was updated successfully, but these errors were encountered: