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

Fixes wrong reformatting of qualified paths in struct patterns #4964

Merged

Conversation

ashvin021
Copy link
Contributor

Fixes #4908.

I also added the example snippet for more_qualified_paths as a test case, and found that the current version formats wrongly outside of macros too (it didn't compile):

 #![feature(more_qualified_paths)]

 fn main() {
     // destructure through a qualified path
-    let <Foo as A>::Assoc { br } = StructStruct { br: 2 };
     let A::Assoc { br } = StructStruct { br: 2 };
 }

Both are fixed in this PR :)

Copy link
Member

@calebcartwright calebcartwright left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beautiful, love easy fixes. Thank you!

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

Successfully merging this pull request may close these issues.

Rustfmt wrongly reformats qualified paths in a match expression in macro
2 participants