Closed
Description
openedon Aug 5, 2021
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:
Instead, this happened: Rustdoc does not generate those methods:
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