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 show rustc_layout #75988

Closed
pickfire opened this issue Aug 27, 2020 · 2 comments · Fixed by #83501
Closed

Rustdoc show rustc_layout #75988

pickfire opened this issue Aug 27, 2020 · 2 comments · Fixed by #83501
Assignees
Labels
A-layout Area: Memory layout of types C-feature-request Category: A feature request, i.e: not implemented / a PR. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@pickfire
Copy link
Contributor

pickfire commented Aug 27, 2020

It would be good to be able to understand the size, abi and debug stuff related to rustc_layout. Instead of needing users to manually add #[rustc_layout(debug)] to struct and enum on nightly, why not just show it on rustdoc generated pages, this may only be limited to concrete struct and enum, otherwise it may not be as useful since currently rustc_layout is not so useful on those.

CC @rust-lang/rustdoc

@jonas-schievink
Copy link
Contributor

If this ends up getting implemented, please make sure to clarify that the layout is implementation-defined and unstable unless #[repr] is used.

@jyn514 jyn514 added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. C-feature-request Category: A feature request, i.e: not implemented / a PR. A-layout Area: Memory layout of types labels Aug 27, 2020
@camelid camelid self-assigned this Mar 21, 2021
@bors bors closed this as completed in 40be1d3 May 12, 2021
@pickfire
Copy link
Contributor Author

pickfire commented Jan 24, 2023

Given that this have been there for quite some time and even rust-analyzer can show type size information on hover, should we stabilize this?

Screenshot_20230124_090115

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-layout Area: Memory layout of types C-feature-request Category: A feature request, i.e: not implemented / a PR. 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.

5 participants