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

Fix trait bounds display #127975

Merged
merged 3 commits into from
Jul 21, 2024
Merged

Conversation

GuillaumeGomez
Copy link
Member

Fixes #127398.

I took a simple rule: if there are more than two bounds, we display them like rustfmt.

Before this PR:

Screenshot from 2024-07-19 17-38-59

After this PR:

Screenshot from 2024-07-19 17-39-09

r? @notriddle

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Jul 19, 2024
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez
Copy link
Member Author

A rebase was needed. Cross updates, yeay :D

Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of using a browser, can't this be more easily checked with an HTML snapshot test (browser tests are slower to run and a lot more flaky).

Copy link
Member Author

Choose a reason for hiding this comment

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

That's what I originally did. We can check that the HTML contains backline, but we can't be sure that the backline are actually processed as such unless we have access to the position unfortunately. Hence why I decided to go for a GUI test in the end.

@notriddle
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Jul 20, 2024

📌 Commit eec3c3d has been approved by notriddle

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 20, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 20, 2024
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#127720 ([`macro_metavar_expr_concat`] Allow `concat` in repetitions)
 - rust-lang#127734 (Windows: move BSD socket shims to netc)
 - rust-lang#127752 (Ignore allocation bytes in one more mir-opt test)
 - rust-lang#127839 (Fix git safe-directory path for docker images)
 - rust-lang#127867 (Add `wasm32-wasip2` to `build-manifest` tool)
 - rust-lang#127958 (Cleanup rmake.rs setup in compiletest)
 - rust-lang#127975 (Fix trait bounds display)
 - rust-lang#128005 (Remove _tls_used hack)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 21, 2024
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#127720 ([`macro_metavar_expr_concat`] Allow `concat` in repetitions)
 - rust-lang#127734 (Windows: move BSD socket shims to netc)
 - rust-lang#127752 (Ignore allocation bytes in one more mir-opt test)
 - rust-lang#127839 (Fix git safe-directory path for docker images)
 - rust-lang#127867 (Add `wasm32-wasip2` to `build-manifest` tool)
 - rust-lang#127958 (Cleanup rmake.rs setup in compiletest)
 - rust-lang#127975 (Fix trait bounds display)
 - rust-lang#128005 (Remove _tls_used hack)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 17aaba7 into rust-lang:master Jul 21, 2024
6 checks passed
@rustbot rustbot added this to the 1.81.0 milestone Jul 21, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jul 21, 2024
Rollup merge of rust-lang#127975 - GuillaumeGomez:fix-trait-bounds-display, r=notriddle

Fix trait bounds display

Fixes rust-lang#127398.

I took a simple rule: if there are more than two bounds, we display them like rustfmt.

Before this PR:

![Screenshot from 2024-07-19 17-38-59](https://github.com/user-attachments/assets/4162b57e-7ebb-48f9-a3a1-25e443c140cb)

After this PR:

![Screenshot from 2024-07-19 17-39-09](https://github.com/user-attachments/assets/a3ba22dd-5f34-45d0-ad9d-0cdf89dc509c)

r? `@notriddle`
@GuillaumeGomez GuillaumeGomez deleted the fix-trait-bounds-display branch July 21, 2024 09:17
@cuviper cuviper modified the milestones: 1.81.0, 1.82.0 Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rustdoc: overflowing supertraits should wrap, not scroll
6 participants