-
Notifications
You must be signed in to change notification settings - Fork 908
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 removes leading pipe from patterns #3973
Comments
In particular, this makes it impossible to actually format a large match in "one pattern per line" style with proper alignment. |
How rustfmt should handle the leading pipe was discussed in rust-lang/style-team#119. The conclusion was to strip the leading pipe by default, but also provide an option to enable the leading pipe. Unfortunately, we have not implemented the option yet. |
@rustbot claim |
Error: This repository is not enabled to use triagebot. Please let |
Is there some issue to subscribe to so I can know when this fix is available on Rust nightly? It's been a few months but from all I could find out, this issue is still open in the latest shipped rustfmt ("rustfmt 1.4.20"). |
For issues like this one that have the milestone set to 2.0.0, the plan was to wait to ship them as part of the rustfmt v2.0 release which is why this isn't available in any released 1.x versions. We were originally planning to release v2.0 a long time ago, but as we started preparing to do so several questions and concerns were raised by various individuals and folks on the Dev Tools team, notably around having a major/breaking release of a tool, especially independent of something like a new Edition. As such the 2.0 release timing, and all the features/fixes/breaking changes/etc. it contains, are in a bit of limbo at the moment. #4346 would probably be the best issue to subscribe to for updates around the 2.0 release itself. I'm going to cut a 1.4.22 branch here shortly for the next release though, and will try to get this backported there so this will be available. In general if there's any 2.0 features/fixes/etc. that are needed more urgently then just drop us a note and we'll see if backporting to a 1.x release is viable. It's just painful and tricky for us right now as the codebase and structure between 1.x and 2.x is so different that cherrypicking is rarely possible, and we also have to rethink 2.x changes in the context of the stability guarantee that's applicable for changes that are released under a 1.x version. |
gets reformatted to
I can understand that the
=>
on its own line needs an RFC, but the removal of the leading pipe makes that rust language feature essentially unusable.The text was updated successfully, but these errors were encountered: