Skip to content

Unwanted macro re-exports show up in documentation #145577

@Voultapher

Description

@Voultapher

Code

prelude exported macros

Image

Reproduction Steps

  1. Open this https://doc.rust-lang.org/std/index.html?search=assert link

Alternatively

  1. Export macros directly from the prelude with #[doc(no_inline)]pub use such as here:
    pub use core::prelude::v1::{

Expected Outcome

If #[doc(no_inline)] is used the re-exported item should not show up.

Actual Output

The re-exported item still shows up.

Version

This issue is not related to a specific browser, it happens with stable, nightly and dev rustdoc.

Additional Details

I noticed this issue while working on #139493, which exacerbates the problem to all prelude macros. And there is a test that checks that typing "prinltn" into the search only returns 3 items and not 6 like it does with the change. Which suggests to me these re-exports are not desirable.

Before:

Image

After:

Image

Metadata

Metadata

Assignees

Labels

A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)A-rustdoc-searchArea: Rustdoc's search featureC-bugCategory: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.T-rustdoc-frontendRelevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions