You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
calebcartwright
changed the title
rustfmt fails to format match matching on tuples of enums
rustfmt fails to format matches! call with enum wildcard destructuring and joined patterns
Nov 5, 2020
This doesn't really have anything to do with tuples, and despite the semantics, nor with matches either. The issue is really with the failure to parse that second arg which occurs when there's both a semantic enum wildcard destruct and a | operator from a pattern join.
Simple repro with exaggerated spacing for effect to show rustfmt bailing and reverting to the original formatting:
This has been fixed, presumably via the various upstream work in rustc around the token streams/macro handling. Improvements are already available on master, and included in the upcoming v1.4.28 release.
Input
Output
Expected output
something more like:
Meta
rustfmt 1.4.22-nightly (97d0301 2020-10-04)
The text was updated successfully, but these errors were encountered: