Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustdoc: Missing method signatures in trait docs #111064

Closed
Nemo157 opened this issue May 1, 2023 · 3 comments · Fixed by #111095
Closed

rustdoc: Missing method signatures in trait docs #111064

Nemo157 opened this issue May 1, 2023 · 3 comments · Fixed by #111095
Labels
A-rustdoc-ui Area: Rustdoc UI (generated HTML) C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@Nemo157
Copy link
Member

Nemo157 commented May 1, 2023

https://docs.rs/parry2d/0.13.4/parry2d/bounding_volume/trait.BoundingVolume.html

image

image

I haven't attempted to really look into what's going wrong, but taking a quick glance at the source and build log on docs.rs there's nothing obviously weird jumping out to me.

Meta

Latest version of the crate was built on docs.rs using rustc 1.71.0-nightly (9ecda8de8 2023-04-30) and rustc 1.70.0-nightly (84dd17b56 2023-04-14) and showed the issue, The first version showing the issue was 0.13.1 which was built with rustc 1.69.0-nightly (34e6673a0 2023-02-25) while the last version without the issue was 0.13.0 which was built with rustc 1.68.0-nightly (afaf3e07a 2023-01-14)

@Nemo157 Nemo157 added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. C-bug Category: This is a bug. A-rustdoc-ui Area: Rustdoc UI (generated HTML) labels May 1, 2023
@compiler-errors
Copy link
Member

compiler-errors commented May 2, 2023

@GuillaumeGomez I think you regressed this in #107000.

Specifically, it fails by trying to render a stripped trait item when you re-export a doc(hidden) trait like so:

#[doc(hidden)]
mod hidden {
    pub trait Foo {
        // Hello, world!
        fn test();
    }
}

pub use hidden::Foo;

@compiler-errors
Copy link
Member

Specifically, this code does not respect inlining for trait items.

if !is_hidden && i.inline_stmt_id.is_none() {
// We don't need to check if it's coming from a reexport since the reexport itself was
// already checked.
is_hidden = i
.item_id
.as_def_id()
.and_then(|def_id| def_id.as_local())
.map(|def_id| inherits_doc_hidden(self.tcx, def_id))
.unwrap_or(false);

@GuillaumeGomez
Copy link
Member

Thanks for the ping @compiler-errors ! I'll fix it in the next hours.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-ui Area: Rustdoc UI (generated HTML) C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants