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: section methods from Deref hidden when no_std is set #95325

Closed
marcospb19 opened this issue Mar 26, 2022 · 0 comments · Fixed by #96536
Closed

rustdoc: section methods from Deref hidden when no_std is set #95325

marcospb19 opened this issue Mar 26, 2022 · 0 comments · Fixed by #96536
Labels
C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@marcospb19
Copy link
Contributor

If no_std is set, section "methods from Deref" does not appear for struct.

I tried this code:

// Comment the line below to make it work as expected.
#![no_std]

use core::ops::Deref;

pub struct MyArray<T> {
    array: [T; 10],
}

impl<T> Deref for MyArray<T> {
    type Target = [T];

    fn deref(&self) -> &Self::Target {
        &self.array
    }
}

Then ran:

cargo doc --open

I expected this to show up:

image

Instead, it did not show up:

image

Meta

rustdoc --version --verbose:

rustdoc 1.61.0-nightly (d53246fed 2022-03-25)
binary: rustdoc
commit-hash: d53246fedde4c193eae8a003546a8f0f9f85d223
commit-date: 2022-03-25
host: x86_64-unknown-linux-gnu
release: 1.61.0-nightly
LLVM version: 14.0.0
@marcospb19 marcospb19 added the C-bug Category: This is a bug. label Mar 26, 2022
@marcospb19 marcospb19 changed the title rustdoc: section methods from Deref hidden when no_std is set rustdoc: section methods from Deref hidden when no_std is set Mar 26, 2022
@GuillaumeGomez GuillaumeGomez added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Mar 27, 2022
@bors bors closed this as completed in 0b96be7 Apr 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

2 participants