Skip to content

Intra-doc links doesn't work for proc macros #73173

Closed
@Manishearth

Description

@Manishearth

Part of #43466

intra-doc links is incapable of linking to proc macros

You can reproduce this both with and without the pub use

Reproduction

Cargo.toml

[package]
name = "repro"
version = "0.1.0"
edition = "2018"

[dependencies]
the-macro = { path = "the-macro" }

src/lib.rs

//! Please check out the procedural macro:
//!
//! - [Repro]
//! - [Repro][]
//! - [Repro](Repro)
//!
//! - [Repro!]
//! - [Repro!][]
//! - [Repro!](Repro!)
//!
//! - [macro Repro]
//! - [macro Repro][]
//! - [macro Repro](macro@Repro)
//!
//! - [macro Repro!]
//! - [macro Repro!][]
//! - [macro Repro!](macro@Repro!)

pub use the_macro::Repro;

the-macro/Cargo.toml

[package]
name = "the-macro"
version = "0.1.0"
edition = "2018"

[lib]
proc-macro = true

[dependencies]

the-macro/src/lib.rs

use proc_macro::TokenStream;

#[proc_macro_derive(Repro)]
pub fn repro_derive(input: TokenStream) -> TokenStream {
    input
}

Originally posted by @shepmaster in #43466 (comment)

Metadata

Metadata

Assignees

Labels

A-intra-doc-linksArea: Intra-doc links, the ability to link to items in docs by nameC-bugCategory: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions