You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adjust rhs shape width to account for next line indentation
Fixes 5321
Previously the `Shape` returned from `expr::shape_from_rhs_tactic` would
always return a `Shape` with a `width` == `config.max_width` when the
`rhs_tactic` was `RhsTactics::ForceNextLineWithoutIndent` and the
indentation was 0. For example, when rewriting generic trait bounds at
the top level of a file.
In this case, trait bounds that were between (`max_width` - `tab_spaces`)
and `max_width`, would be considered properly formatted and wouldn't
wrap.
Now, the shape takes into account the whitespace to properly wrap
when the `max_width` is exceeded.
0 commit comments