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

Exported macros appear twice in left sidebar (rustc 1.60.0 nightly, docsrs 0.6.0) #93912

Closed
tnballo opened this issue Feb 11, 2022 · 8 comments · Fixed by #94002
Closed

Exported macros appear twice in left sidebar (rustc 1.60.0 nightly, docsrs 0.6.0) #93912

tnballo opened this issue Feb 11, 2022 · 8 comments · Fixed by #94002
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@tnballo
Copy link
Contributor

tnballo commented Feb 11, 2022

Hey! Ran into what appears to be a bug - crate's exported macros each appear twice in the left sidebar:

doc_err_2

Please let me know if I can provide additional info.

@syphar
Copy link
Member

syphar commented Feb 11, 2022

Thank you for the report!

This is definitely not an issue with docs.rs itself, but with rustdoc.

@GuillaumeGomez @jsha is this known? Should a rustdoc issue be created?

@jsha
Copy link
Contributor

jsha commented Feb 11, 2022 via email

@GuillaumeGomez GuillaumeGomez transferred this issue from rust-lang/docs.rs Feb 11, 2022
@GuillaumeGomez GuillaumeGomez added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Feb 11, 2022
@GuillaumeGomez
Copy link
Member

Seems similar to #89852.

@tnballo
Copy link
Contributor Author

tnballo commented Feb 11, 2022

Thanks for transferring the issue.

One difference between this and #89852 - both macros are exported using a wildcard in crate root lib.rs (not as rename):

mod macros;
pub use macros::*;

@GuillaumeGomez
Copy link
Member

Well, just another reexport issue. It's common around here. 😆

I'll try to take a look in the next days.

@GuillaumeGomez
Copy link
Member

This is what I have on currently nightly:

Screenshot from 2022-02-12 14-07-53

So I guess it's fixed?

@tnballo
Copy link
Contributor Author

tnballo commented Feb 12, 2022

Trying locally with the latest nightly (rustc 1.60.0-nightly (e789f3a3a 2022-02-11), more current than that of issue open) I get the same initial landing page for cargo doc --open but if I click on one of the macros listed (e.g. "drill down") duplicates still appear on the sidebar:

doc_err_3

So the tiny bug is still there, just deeper/hidden on the latest nightly?

@GuillaumeGomez
Copy link
Member

Ah indeed! I can also reproduce it now. Will take another look tomorrow then.

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Feb 19, 2022
…acro, r=notriddle

rustdoc: Avoid duplicating macros in sidebar

Fixes rust-lang#93912.

cc `@jsha` (for the GUI test)
r? `@camelid`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Feb 19, 2022
…acro, r=notriddle

rustdoc: Avoid duplicating macros in sidebar

Fixes rust-lang#93912.

cc ``@jsha`` (for the GUI test)
r? ``@camelid``
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Feb 19, 2022
…acro, r=notriddle

rustdoc: Avoid duplicating macros in sidebar

Fixes rust-lang#93912.

cc ```@jsha``` (for the GUI test)
r? ```@camelid```
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Feb 19, 2022
…acro, r=notriddle

rustdoc: Avoid duplicating macros in sidebar

Fixes rust-lang#93912.

cc ````@jsha```` (for the GUI test)
r? ````@camelid````
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Feb 19, 2022
…acro, r=notriddle

rustdoc: Avoid duplicating macros in sidebar

Fixes rust-lang#93912.

cc `````@jsha````` (for the GUI test)
r? `````@camelid`````
@bors bors closed this as completed in 1ae00e0 Feb 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

4 participants