How do I properly write macro documentation if the macro is defined in a module?
问题 I defined a macro in a module, and it works fine. Now, I'm trying to document said macro with an example. Apparently, I need to manually specify the crate line to ask for macros: /// ``` /// # #[macro_use] extern crate foo; /// // Some code /// ``` However, I now get an error saying: error: an `extern crate` loading macros must be at the crate root Apparently the example code is loaded in the macro's module, and does not seem compatible with macro_use ... I can't believe everyone writes