Skip to content

[WIP] Format interior of brace macros #3446

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

Closed
wants to merge 1 commit into from

Conversation

nhynes
Copy link

@nhynes nhynes commented Mar 13, 2019

Resolves #3445.

The primary change is in macros.rs and un-skips formatting of brace macros (simply removes the conditional).
The other change is in imports.rs and address what seems to be a general bug in which Use statements aren't formatted when there's an empty attrs array. Perhaps it would be better to address the underlying cause of Some([]) (or even why use Option when an empty Vec has the same semantics as None).

@nhynes nhynes changed the title Format interior of brace macros [WIP] Format interior of brace macros Mar 13, 2019
@scampi
Copy link
Contributor

scampi commented May 23, 2019

Sorry for the delay in commenting! Can you move the change of imports.rs into a separate PR and add a test for it ? This way we could solve the problem you found while still pondering the formatting of brace macros.

@nhynes nhynes force-pushed the format-brace-macros branch from 2785812 to 0f8e59b Compare May 26, 2019 21:59
@nhynes
Copy link
Author

nhynes commented May 26, 2019

Looks like someone already applied the fix to imports. Still would be nice to have formatting inside of brace macros when the interior is rust code (e.g., in quote!).

@topecongiro
Copy link
Contributor

My apologies for the late review.

The primary change is in macros.rs and un-skips formatting of brace macros (simply removes the conditional).

IMHO, the current macro formatting is not good enough for enabling this. As such, I am closing this PR as won't merge. Thanks!

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.

[Feature Request] Attempt to format brace macros as Block
3 participants