-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 regression: duplicate macro in sidebar #89852
Comments
Bisectsearched nightlies: from nightly-2021-08-10 to nightly-2021-09-26 bisected with cargo-bisect-rustc v0.6.0Host triple: x86_64-unknown-linux-gnu cargo bisect-rustc 2021-08-10 --end 2021-09-26 --prompt -- doc --open |
It looks like in both versions there's also a bug where |
I think the fix here is to show "pub use repro as repro2" in the crate root - it sounds like currently it's being unconditionally inlined and then on top of that using the original name instead of the new one. |
This also affect the unstable json output of rustdoc. If we take the example given by @dtolnay there are 3 items (1 reexport + 2 macro) instead of only two:
The bug seems that the macro |
…laumeGomez Fix macro_rules! duplication when reexported in the same module This can append if within the same module a `#[macro_export] macro_rules!` is declared but also a reexport of itself producing two export of the same macro in the same module. In that case we only want to document it once. Before: ``` Module { is_crate: true, items: [ Id("0:4"), // pub use crate::repro as repro2; Id("0:3"), // macro_rules! repro Id("0:3"), // duplicate, same as above ], } ``` After: ``` Module { is_crate: true, items: [ Id("0:4"), // pub use crate::repro as repro2; Id("0:3"), // macro_rules! repro ], } ``` Fixes rust-lang#89852
$ cargo doc --open
In current stable, and nightly-2021-08-28:
In current beta, current nightly, and nightly-2021-08-29:
Notice that
repro
appears twice in the sidebar under the list of macros exported by the crate.Bisects to #88019.
The text was updated successfully, but these errors were encountered: