Skip to content

Conversation

dtolnay
Copy link
Member

@dtolnay dtolnay commented Oct 1, 2020

This is a straightforward backport of #4164 to resolve rustfmt deleting important code when using the cxx crate; see dtolnay/cxx#330 (comment).

Previously, non-trivial type aliases in extern blocks were dropped by
rustfmt because only the type alias name would be passed to a rewritter.
This commit fixes that by passing all type information (generics,
bounds, and assignments) to a type alias rewritter, and consolidates
`rewrite_type_alias` and `rewrite_associated_type` as one function.
@adetaylor
Copy link

This would be useful for me as well. Thanks for the backport.

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.

4 participants