Skip to content

rustc_mir_build::build::unpack! macro does not appear in docs #78090

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

Closed
camelid opened this issue Oct 18, 2020 · 6 comments
Closed

rustc_mir_build::build::unpack! macro does not appear in docs #78090

camelid opened this issue Oct 18, 2020 · 6 comments
Labels
A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@camelid
Copy link
Member

camelid commented Oct 18, 2020

The rustc_mir_build::build::unpack! macro does not appear in the online rustc API docs. I tried searching for it and also typing in different URLs.

Yet the rustc_apfloat::unpack! macro does appear in the API docs. I'm not sure why one is showing up and one is not.

Not sure if this is a rustdoc bug.

@camelid camelid added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools C-bug Category: This is a bug. labels Oct 18, 2020
@nagisa
Copy link
Member

nagisa commented Oct 18, 2020

The rustc_mir_build::build::unpack! is private, rustc_apfloat one is exported. I believe we don't build our documentation with private items documented, so that'd be working as intended.

Closing, but feel free to reopen if you feel its a bug still.

@nagisa nagisa closed this as completed Oct 18, 2020
@camelid
Copy link
Member Author

camelid commented Oct 18, 2020

Ah, I was wondering if that could be it, but I missed the #[macro_export] since rustdoc scrolls so the top of the page is the top of the declaration, not the attributes.

@camelid
Copy link
Member Author

camelid commented Oct 18, 2020

Hmm, that's weird: other items that are private show up in the documentation. Do non-exported macro_rules! not count as ordinary "private items"?

@camelid
Copy link
Member Author

camelid commented Oct 18, 2020

E.g. rustc_mir_build::build::mir_build, which is private.

@camelid
Copy link
Member Author

camelid commented Oct 18, 2020

Actually it looks we do document private items for the compiler:

rust/src/bootstrap/doc.rs

Lines 525 to 530 in 44ae0b8

// Build cargo command.
let mut cargo = builder.cargo(compiler, Mode::Rustc, SourceType::InTree, target, "doc");
cargo.rustdocflag("--document-private-items");
cargo.rustdocflag("--enable-index-page");
cargo.rustdocflag("-Zunstable-options");
compile::rustc_cargo(builder, &mut cargo, target);

@nagisa nagisa reopened this Oct 18, 2020
@camelid
Copy link
Member Author

camelid commented Oct 18, 2020

This occurs in non-compiler code too, so I opened a rustdoc issue: #78091.

@camelid camelid closed this as completed Oct 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

2 participants