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

repr(u8) appears on std documentation of c_void #137440

Open
geeklint opened this issue Feb 22, 2025 · 0 comments · May be fixed by #116882
Open

repr(u8) appears on std documentation of c_void #137440

geeklint opened this issue Feb 22, 2025 · 0 comments · May be fixed by #116882
Assignees
Labels
A-cross-crate-reexports Area: Documentation that has been re-exported from a different crate A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools A-repr Area: the `#[repr(stuff)]` attribute C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@geeklint
Copy link
Contributor

Location

Stable documentation:
https://doc.rust-lang.org/std/ffi/enum.c_void.html
Permalink to comment in source code:
https://doc.rust-lang.org/1.85.0/src/core/ffi/mod.rs.html#218

Summary

There's a comment in the source code that suggests the repr(u8) attribute on c_void is an internal implementation detail that shouldn't be exposed to documentation, and is wrapped in a cfg_attr to that effect.

This appears to have worked for the core crate docs, but the re-export in std does have the attribute visible.

@geeklint geeklint added the A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools label Feb 22, 2025
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Feb 22, 2025
@fmease fmease self-assigned this Feb 22, 2025
@fmease fmease 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-cross-crate-reexports Area: Documentation that has been re-exported from a different crate A-repr Area: the `#[repr(stuff)]` attribute and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Feb 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cross-crate-reexports Area: Documentation that has been re-exported from a different crate A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools A-repr Area: the `#[repr(stuff)]` attribute 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