Skip to content

rustdoc: Fix links with inline code in trait impl docs #140868

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

Merged

Conversation

SpecificProtagonist
Copy link
Contributor

@SpecificProtagonist SpecificProtagonist commented May 9, 2025

Fixes #140857

@rustbot
Copy link
Collaborator

rustbot commented May 9, 2025

r? @notriddle

rustbot has assigned @notriddle.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels May 9, 2025
@rustbot
Copy link
Collaborator

rustbot commented May 9, 2025

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez, @jsha

@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez
Copy link
Member

Can you add a GUI test please? Doc is available here.

@notriddle
Copy link
Contributor

notriddle commented May 10, 2025

As far as I know the only html tags that can appear within the links generated from doc comments are code tags, if there are any others this needs to be expanded.

Not true. I can nest any tag I want in a link in a doc comment.

[my **bold**, _uncompromising_ ![Rust](https://doc.rust-lang.org/1.84.0/static.files/rust-logo-9a9549ea.svg) link](https://example.com)

my bold, uncompromising Rust link

To fix this, you'll need to iterate over the whole list of elements until you reach the summary.

@rustbot
Copy link
Collaborator

rustbot commented May 10, 2025

Some changes occurred in GUI tests.

cc @GuillaumeGomez

@SpecificProtagonist SpecificProtagonist force-pushed the rustdoc-trait-impl-code-link branch from 3734a75 to 31ae60d Compare May 10, 2025 17:36
@SpecificProtagonist
Copy link
Contributor Author

To fix this, you'll need to iterate over the whole list of elements until you reach the summary.

Fixed, thanks.

Can you add a GUI test please?

Done :)

@notriddle
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented May 21, 2025

📌 Commit 4516a5b 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 May 21, 2025
@GuillaumeGomez
Copy link
Member

Sorry, completely forgot about this PR. Thanks @notriddle!

@SpecificProtagonist: Don't hesitate to ping me if you have no news. 😆

bors added a commit to rust-lang-ci/rust that referenced this pull request May 22, 2025
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#140431 (dont handle bool transmute)
 - rust-lang#140868 (rustdoc: Fix links with inline code in trait impl docs)
 - rust-lang#141323 (Add bors environment to CI)
 - rust-lang#141337 (bump stdarch)
 - rust-lang#141364 (rustdoc-json: Remove false docs and add test for inline attribute)
 - rust-lang#141370 (add doc alias `replace_first` for `str::replacen`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 981bbf4 into rust-lang:master May 22, 2025
6 checks passed
@rustbot rustbot added this to the 1.89.0 milestone May 22, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request May 22, 2025
Rollup merge of rust-lang#140868 - SpecificProtagonist:rustdoc-trait-impl-code-link, r=notriddle

rustdoc: Fix links with inline code in trait impl docs

Fixes rust-lang#140857
github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request May 26, 2025
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#140431 (dont handle bool transmute)
 - rust-lang#140868 (rustdoc: Fix links with inline code in trait impl docs)
 - rust-lang#141323 (Add bors environment to CI)
 - rust-lang#141337 (bump stdarch)
 - rust-lang#141364 (rustdoc-json: Remove false docs and add test for inline attribute)
 - rust-lang#141370 (add doc alias `replace_first` for `str::replacen`)

r? `@ghost`
`@rustbot` modify labels: rollup
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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rustdoc: Inline code in links in first paragraph of doc of trait implementation not clickable
6 participants