Skip to content

Rustdoc no longer shows 'Methods from Deref impls' at all #87783

Closed

Description

I tried this code:

    use std::path::{Path, PathBuf};

    pub struct Foo(PathBuf);
    impl std::ops::Deref for Foo {
        type Target = Path;
        fn deref(&self) -> &Path { &self.0 }
    }

I expected to see this happen: Rustdoc shows the docs for Path::from_str on the docs for Foo, like it used to in 1.51:
image

Instead, this happened: Rustdoc does not generate those methods:
image

Meta

searched nightlies: from nightly-2021-04-01 to nightly-2021-07-30
regressed nightly: nightly-2021-06-16
searched commits: from 539d7bd to 607d6b0
regressed commit: d74b36e

bisected with cargo-bisect-rustc v0.6.0

Host triple: x86_64-unknown-linux-gnu
Reproduce with:

cargo bisect-rustc --script ./docs-exist.sh --start 2021-04-01 

where docs-exist.sh is

#!/bin/sh
cargo doc
grep 'Methods from Deref' ${CARGO_TARGET_DIR:-target}/doc/hello_world/foo/struct.Foo.html

cc @pnkfelix

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

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.P-highHigh priorityT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions