Closed
Description
As part of dtolnay/syn#225 I am generating one macro_rules! macro from another macro_rules! macro. Everything works great except that the documentation of the generated macro is misleading.
Simplified example:
macro_rules! outer {
($(($n:ident $kw:ident))*) => {
$(
#[derive(Debug)]
pub struct $n;
)*
#[macro_export]
macro_rules! inner {
$(
($kw) => { $n };
)*
}
}
}
outer! {
(Let let)
(Loop loop)
(Match match)
(Mod mod)
}
fn main() {
println!("{:?}", inner!(loop));
}
Rustdoc shows the following:
macro_rules! inner {
($kw) => { ... };
($kw) => { ... };
($kw) => { ... };
($kw) => { ... };
}
Instead I would expect:
macro_rules! inner {
(let) => { ... };
(loop) => { ... };
(match) => { ... };
(mod) => { ... };
}