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

#[doc(hidden)] does not work for externally used macros #39436

Closed
SergioBenitez opened this issue Feb 1, 2017 · 1 comment
Closed

#[doc(hidden)] does not work for externally used macros #39436

SergioBenitez opened this issue Feb 1, 2017 · 1 comment
Assignees

Comments

@SergioBenitez
Copy link
Contributor

If a macro is imported using use (via the use_extern_macros feature), its documentation cannot be hidden. For instance, if the code is:

extern crate serde_json;

#[doc(hidden)]
pub use serde_json::json;

The documentation for the json macro will appear in the rustdocs. Of course, the expected result is that the documentation does not appear.

cc @jseyfried @nrc @dtolnay

@abonander
Copy link
Contributor

I'm going to tinker on this while I'm out of town over the weekend. @jseyfried bug me about this Monday evening-ish if I don't have a progress report by then.

frewsxcv added a commit to frewsxcv/rust that referenced this issue Mar 29, 2017
Rustdoc: memoize `pub use`-reexported macros so they don't appear twice in docs

Closes rust-lang#39436

Preserves existing behavior for `#[macro_reexport]`. `pub use`'d macros are shown as reexports unless inlined, and also correctly obey `#[doc(hidden)]`.

r? @jseyfried

cc @SergioBenitez
frewsxcv added a commit to frewsxcv/rust that referenced this issue Mar 29, 2017
Rustdoc: memoize `pub use`-reexported macros so they don't appear twice in docs

Closes rust-lang#39436

Preserves existing behavior for `#[macro_reexport]`. `pub use`'d macros are shown as reexports unless inlined, and also correctly obey `#[doc(hidden)]`.

r? @jseyfried

cc @SergioBenitez
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants