Skip to content

Rustdoc does not hide implementations of doc(hidden) trait methods #89186

Closed
@jyn514

Description

@jyn514

I tried this code:

pub trait Trait {
    #[doc(hidden)]
    fn f();
}
pub struct S;
impl Trait for S {
    fn f() {}
}

I expected to see this happen: Rustdoc does not show f in the documentation for S.

Instead, this happened:
image

Since f is properly hidden in the documentation for Trait, the link for f is broken.

Meta

rustc --version --verbose:

rustc 1.57.0-nightly (ac2d9fc50 2021-09-21)

Originally posted by @rust-log-analyzer in #89167 (comment)

Metadata

Metadata

Assignees

Labels

A-trait-systemArea: Trait systemC-bugCategory: This is a bug.E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.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