Skip to content

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

Closed

Description

@geeklint

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.

Activity

  1. added
    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and tools
    on Feb 22, 2025
  2. added
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Feb 22, 2025
  3. self-assigned this
    on Feb 22, 2025
  4. added
    T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.
    C-bugCategory: This is a bug.
    A-cross-crate-reexportsArea: Documentation that has been re-exported from a different crate
    A-reprArea: the `#[repr(stuff)]` attribute
    and removed
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Feb 22, 2025
  5. added a commit that references this issue on Jun 16, 2025
    5e6424b
  6. added 2 commits that reference this issue on Sep 25, 2025
    16474c6
    a39d513
  7. added a commit that references this issue on Sep 25, 2025
    527cc10
  8. added a commit that references this issue on Sep 26, 2025
    e3873d8
  9. added a commit that references this issue on Dec 21, 2025
    2a0df28
  10. added a commit that references this issue on Dec 29, 2025
    20b6607
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-cross-crate-reexportsArea: Documentation that has been re-exported from a different crateA-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsA-reprArea: the `#[repr(stuff)]` attributeC-bugCategory: This is a bug.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