Links to std are not rendered in in-lined docs for re-exported derive macros (unlike re-exported traits)
Open
Nobody has claimed this yet.
C-bug
needs-triage
T-rustdoc
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.2k
- PR merge metrics
- PR metrics pending
Description
Code
in crate1:
/// Derives [`IntoIterator`](std::iter::IntoIterator) analog to [Result] & [Option].
#[proc_macro_derive(IntoIterator)]
pub fn into_iterator(input: TokenStream1) -> TokenStream1 {
...
}
in crate2:
/// Methods for transforming TryTypes. Inspired by the methods provided on [`Option`] & [`Result`](std::result::Result)
pub trait Transform<T> {
...
}
in crate0:
#[doc(inline)]
pub use crate1::*;
#[doc(inline)]
pub use crate2::*;
Reproduction Steps
- re-export of crate1 - ❌ does not render links to
IntoIterator,Option,Result - direct docs for crate1 - ✅ does render links to
IntoIterator,Option,Result - re-export of crate2 - ✅ does render links to
Option,Result - direct docs for crate2 - ✅ does render links to
Option,Result
Expected Outcome
Links should be rendered on re-export of derive macros just as they are on re-export of traits
Version
1.98.0-nightly
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the linked docs.rs pages for the re-exported and direct derive-macro documentation, then trace rustdoc's handling of inlined re-exports for derive macros versus traits. Reproduce the crate0, crate1, and crate2 examples against the reported nightly version. Done means links to IntoIterator, Option, and Result render on the re-exported derive-macro page as they do for the trait.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers, documentation
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100