rustdoc: Break bounds if they are too long#107298
rustdoc: Break bounds if they are too long#107298GuillaumeGomez wants to merge 2 commits intorust-lang:masterfrom
Conversation
|
The job Click to see the possible cause of the failure (guessed by this bot) |
|
The relevant issue states that rustdoc version 1.66.1 used to properly break the bounds into several lines meaning that the current state of affairs is a regression. Do you know which PR might have caused this regression? Why can't we do as before? Just curious. |
|
In version 1.66.1 the bounds were not broken automatically; in the example that I showed they were broken up in the source. So the change in 1.67.0 is that it changes for example this source code pub trait T
where
Self: A + B + C,
Self: D + E + F,
{into pub trait T
where
Self: A + B + C + D + E + F,
{ |
|
☔ The latest upstream changes (presumably #107650) made this pull request unmergeable. Please resolve the merge conflicts. |
|
Hello @GuillaumeGomez! I just want to ping you as part of the triage procedure as this PR has merge conflicts and CI failures :) |
|
Doesn't seem like the right approach. |
Fixes #107283.
I'm not super happy with this fix, however, to do better, either we have to make the
displayimplementation take into account a max length and therefore change how we render things completely or we could also parse HTML.In this PR, I decided to take another approach: if there are more than 4 bounds on an item, these bounds are split each on their own line. We could also decide to group them by 2 or more.
I uploaded an example of it here.
r? @notriddle