Skip to content

Strange behavior when clicking to "Examples" and "Panics" headers in the docs #29449

Closed
@defuz

Description

@defuz
  1. Go to https://doc.rust-lang.org/std/vec/struct.Vec.html
  2. Scroll page to method definitions
  3. Click to any "Examples" or "Panics" header.
  4. Page jumps to the first same block on the page.

The problem is that all of these links have the same anchors (#examples, #panics). It is discouraging, especially when you're trying to give someone a link to an example of the documentation.

If it is not an easy fix, it might be worth at least remove <a> in these headers, and especially remove section character (§) on hover (it is clearly suggests that the link can be copied, but url is invalid).

And I'm sorry if this is a duplicate, I haven't found any similar issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    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

    No branches or pull requests

    Issue actions