I want to use the macro in macro-generated documentation:
macro_rules! impl_foo {
($name:ident) => {
fn myfoo() -> $name {
}
};
}
However, the variable will not be replaced. I also tried using the attribute #[doc]:
macro_rules! impl_foo {
($name:ident) => {
fn myfoo() -> $name {
}
};
}
This one can't even parse: unexpected token: 'concat'
source
share