We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Some method calls won't format if there's a long literal string in it. For example, an .expect() with a long message:
.expect()
fn foo() { let _: i32 = "42".parse::<i32>() .expect("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"); }
rustfmt will skip formatting in this entire line. You can test it in in the playground: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=135ec08b2266e6e642bb1603f7592100. If you shorten the string by a single char, it will get formatted correctly.
rustfmt
Tested with rustfmt 1.8.0-nightly (eb4e234674 2024-10-09).
rustfmt 1.8.0-nightly (eb4e234674 2024-10-09)
The text was updated successfully, but these errors were encountered:
Duplicate of #3863
Sorry, something went wrong.
No branches or pull requests
Some method calls won't format if there's a long literal string in it. For example, an
.expect()
with a long message:rustfmt
will skip formatting in this entire line. You can test it in in the playground: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=135ec08b2266e6e642bb1603f7592100. If you shorten the string by a single char, it will get formatted correctly.Tested with
rustfmt 1.8.0-nightly (eb4e234674 2024-10-09)
.The text was updated successfully, but these errors were encountered: