Skip to content

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

Closed
@RalfJung

Description

@RalfJung
Member

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

Activity

added
needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.
on Aug 5, 2024
added
T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.
C-bugCategory: This is a bug.
on Aug 5, 2024
camelid

camelid commented on Aug 5, 2024

@camelid
Member

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

added
A-rustdoc-uiArea: Rustdoc UI (generated HTML)
and removed
needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.
on Aug 5, 2024
notriddle

notriddle commented on Aug 5, 2024

@notriddle
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.

added a commit that references this issue on Aug 5, 2024
ab4b438
added 3 commits that reference this issue on Aug 5, 2024
34928c8
d4f12d6
3a18325
added a commit that references this issue on Aug 6, 2024

Rollup merge of rust-lang#128693 - notriddle:notriddle/impl-disambigu…

4b29f42

1 remaining item

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-rustdoc-searchArea: Rustdoc's search featureA-rustdoc-uiArea: Rustdoc UI (generated HTML)C-bugCategory: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @RalfJung@notriddle@camelid@jieyouxu@rustbot

      Issue actions

        rustdoc generates invalid link: `url#impl-id/method.name` · Issue #128676 · rust-lang/rust