Skip to content

rustdoc: "Methods from Deref" section references functions from completely unrelated types. #128124

@olson-sean-k

Description

@olson-sean-k

I recently published a crate with types that implement Deref. On docs.rs, version 0.2.0 of this crate shows incorrect and completely unrelated methods for the Deref implementation for Vec1. I see the same thing when I build the documentation with recent versions of the nightly toolchain locally (including but not limited to 1.78.0-nightly (f4b771bf1 2024-03-14)).

I only expect the methods of this type (Slice1) to show up in the Deref section for Vec1. However, completely unrelated methods like this from this unrelated type are shown in this section, causing a very large, misleading, and mostly useless list of functions to display.

There are some open bugs regarding the "Methods from Deref" section, but none that seem to observe such unrelated functions. Sorry if I missed something and this is a duplicate and thanks for taking a look!

Metadata

Metadata

Assignees

No one assigned

    Labels

    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

    No branches or pull requests

    Issue actions