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

Format trait aliases with where clauses #3586

Merged
merged 3 commits into from
May 30, 2019

Conversation

topecongiro
Copy link
Contributor

Closes #3584.

Copy link
Contributor

@scampi scampi left a comment

Choose a reason for hiding this comment

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

Thanks! lgtm


let fits_single_line = !generic_bounds_str.contains('\n')
&& !where_str.contains('\n')
&& generic_bounds_str.len() + where_str.len() + 1 <= shape.width;
Copy link
Contributor

Choose a reason for hiding this comment

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

should this use utils::unicode_str_width instead of len in order to take into account some unicode character ? One may occur in a comment inside, e.g., where_str.

src/items.rs Show resolved Hide resolved
@scampi scampi merged commit 6d19a8c into rust-lang:master May 30, 2019
@topecongiro topecongiro deleted the issue-3584 branch May 30, 2019 14:01
@topecongiro topecongiro added this to the 1.3.0 milestone Jun 4, 2019
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 strips the where clause from trait alias
2 participants