Skip to content

rustdoc fails to linkify paths containing turbofish on source code pages under --generate-link-to-definition #156706

@fmease

Description

@fmease

This is a regression that's caused by PR #135771.

Consider the following program:

fn scope() {
    let _: Option<i32>;   // OK    `Option` is linkified.
    let _: Option::<i32>; // FAIL  `Option` is *not* linkified.

    let _ = std::convert::identity(0);      // OK    `identity` is linkified
    let _ = std::convert::identity::<_>(0); // FAIL  `identity` is *not* linkified.

    let _: fn(()) = drop;     // OK    `drop` is linkified
    let _: fn(()) = drop::<>; // FAIL  `drop` is *not* linkified
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-link-to-definitionrustdoc --generate-link-to-definition nightly-only featureC-bugCategory: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way. When possible, use a F-* label instead.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions