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

rustfmt doesn't understand if let chains #5333

Closed
SUPERCILEX opened this issue May 6, 2022 · 2 comments
Closed

rustfmt doesn't understand if let chains #5333

SUPERCILEX opened this issue May 6, 2022 · 2 comments

Comments

@SUPERCILEX
Copy link

See rust-lang/rust#53667, they might be stabilized soon. Currently, rustfmt refuses to make any changes to an if let statement and its contents, silently letting code go unformatted.

@ytmimi
Copy link
Contributor

ytmimi commented May 6, 2022

Thanks for the report.

This is related to #5177, and the PR that adds this support (#5203) is intentionally on hold. I don't know if I can articulate it any better than rust-lang/rust#95262 (comment) and #5203 (comment).

To summarize, there are still some unanswered questions around let-chain formatting being discussed on rust-lang/style-team#169. It's important that the formatting RFC be resolved so we know what rules to implement in rustfmt because there's a strong desire not to continually introduce breaking formatting changes.

The best way to move things forward is to bring broader awareness to rust-lang/style-team#169 and to share your thoughts on the proposal 😁

@SUPERCILEX
Copy link
Author

Thanks for the explanation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants