-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Open
Labels
A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)A-rustdoc-searchArea: Rustdoc's search featureArea: Rustdoc's search featureC-bugCategory: This is a bug.Category: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant 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.Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
Description
Code
prelude exported macros

Reproduction Steps
- Open this https://doc.rust-lang.org/std/index.html?search=assert link
Alternatively
- Export macros directly from the prelude with
#[doc(no_inline)]pub use
such as here:rust/library/std/src/prelude/v1.rs
Line 49 in 425a9c0
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:

After:

Metadata
Metadata
Assignees
Labels
A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)A-rustdoc-searchArea: Rustdoc's search featureArea: Rustdoc's search featureC-bugCategory: This is a bug.Category: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant 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.Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.