How do I link to my macro whose name clashes with a struct and which is always in scope along with the struct in a doc comment of the struct in the module containing both?

2026-10-14来源 Rust Users ForumEnglish
How do I link to my macro whose name clashes with a struct and which is always in scope along with the struct in a doc comment of the struct in the module containing both?

I just released bevy_exclusive_components,

exclusive.rs contains a macro and a struct, both have the same name:

struct Exclusive { // -- SNIP -- } macro_rules! Exclusive { // -- SNIP -- } 

lib.rs reexports both

mod exclusive; pub use exclusive::*; 

and the issue is that the doc comments of Exclusive try to link to Exclusive!, which fails, even if I write [`macro@Exclusive`]

1 post - 1 participant

Read full topic

原文:https://www.a8q9.cn/en/article/how-do-i-link-to-my-macro-whose-name-clashes-with-a-struct-and-which-is-always-i-46ccfb.html

相关文章