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: --document-private-items does not document non-exported macros #78091

Closed
camelid opened this issue Oct 18, 2020 · 2 comments
Closed
Labels
A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@camelid
Copy link
Member

camelid commented Oct 18, 2020

With --document-private-items:

  • private fns are documented
  • public fns are documented
  • #[macro_export] macro_rules! are documented
  • non-exported macro_rules! are not documented

I'm not sure if this is intended behavior, but it's not very intuitive and kind of frustrating.

Code

macro_rules! foo_macro {
    () => { };
}

#[macro_export]
macro_rules! exported_foo_macro {
    () => { };
}

fn foo_fn() {}

pub fn pub_foo_fn() {}

Command

cargo doc --document-private-items

Output

image

Version

$ rustdoc -vV
rustdoc 1.47.0 (18bf6b4f0 2020-10-07)
binary: rustdoc
commit-hash: 18bf6b4f01a6feaf7259ba7cdae58031af1b7b39
commit-date: 2020-10-07
host: x86_64-apple-darwin
release: 1.47.0
LLVM version: 11.0
@camelid camelid added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) C-bug Category: This is a bug. labels Oct 18, 2020
@jonas-schievink
Copy link
Contributor

Duplicate of #73754

@jonas-schievink jonas-schievink marked this as a duplicate of #73754 Oct 18, 2020
@camelid
Copy link
Member Author

camelid commented Oct 18, 2020

Dang, I searched for it, but the title confused me so I thought it was something else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) 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

No branches or pull requests

2 participants