I defined a macro in a module and it works great. Now I'm trying to document a macro with an example. Apparently , I need to manually specify the box line to request macros:
However, now I get the error message:
error: an `extern crate` loading macros must be at the crate root
Apparently, the sample code is loaded into the macro mode and does not seem to be compatible with macro_use...
I can’t believe that everyone writes macros directly in the root module ... right?
source
share