-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Repr is incorrectly documented for structs with hidden field #128364
Copy link
Copy link
Closed
Labels
A-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)A-reprArea: the `#[repr(stuff)]` attributeArea: the `#[repr(stuff)]` attributeC-bugCategory: This is a bug.Category: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)A-reprArea: the `#[repr(stuff)]` attributeArea: the `#[repr(stuff)]` attributeC-bugCategory: This is a bug.Category: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Previous discussions of
reprdocumentation:#[repr(transparent)]where the field is non-public #90435#[repr(transparent)]if it isn't part of the public ABI #115439I believe the intent was that
repr(transparent)should only appear in rendered documentation if the field's type is a public API that the documentation reader gets to rely on.This is the case for
repro::Public, and not the case forrepro::Private.I believe
repro::Hiddenshould be treated more likerepro::Privatefor the purpose of documenting repr.In the standard library, this currently impacts
core::pin::Pin. https://doc.rust-lang.org/1.80.0/core/pin/struct.Pin.html