Skip to content

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