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

rustdoc generates invalid link: url#impl-id/method.name #128676

Closed
RalfJung opened this issue Aug 5, 2024 · 2 comments · Fixed by #128693
Closed

rustdoc generates invalid link: url#impl-id/method.name #128676

RalfJung opened this issue Aug 5, 2024 · 2 comments · Fixed by #128693
Labels
A-rustdoc-search Area: Rustdoc's search feature A-rustdoc-ui Area: Rustdoc UI (generated HTML) C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@RalfJung
Copy link
Member

RalfJung commented Aug 5, 2024

I spotted this in these search results: the TyCtxt::adt_def result links to https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/context/struct.TyCtxt.html#impl-TyCtxt%3C'tcx%3E/method.adt_def which is not a valid link.

Cc @rust-lang/rustdoc

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Aug 5, 2024
@camelid camelid added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. C-bug Category: This is a bug. labels Aug 5, 2024
@camelid
Copy link
Member

camelid commented Aug 5, 2024

cc @notriddle -- I think these are supposed to be autoredirected in JS?

@jieyouxu jieyouxu added A-rustdoc-ui Area: Rustdoc UI (generated HTML) A-rustdoc-search Area: Rustdoc's search feature and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Aug 5, 2024
@notriddle
Copy link
Contributor

Okay...

This happens because there's more than one impl<'tcx> TyCtxt<'tcx> and the one we want is currently named #impl-TyCtxt%3C'tcx%3E-35. The URL escaping is fine; the -35 is the problem.

notriddle added a commit to notriddle/rust that referenced this issue Aug 5, 2024
notriddle added a commit to notriddle/rust that referenced this issue Aug 5, 2024
notriddle added a commit to notriddle/rust that referenced this issue Aug 6, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Aug 6, 2024
…ator-2024, r=GuillaumeGomez

rustdoc-search: account for numeric disambiguators on impls

Fixes rust-lang#128676
@bors bors closed this as completed in 3a18325 Aug 7, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Aug 7, 2024
Rollup merge of rust-lang#128693 - notriddle:notriddle/impl-disambiguator-2024, r=GuillaumeGomez

rustdoc-search: account for numeric disambiguators on impls

Fixes rust-lang#128676
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-search Area: Rustdoc's search feature A-rustdoc-ui Area: Rustdoc UI (generated HTML) C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants