rust/tests/ui/macros/macro-doc-comments.rs
2023-01-11 09:32:08 +00:00

27 lines
344 B
Rust

// run-pass
#![allow(non_snake_case)]
macro_rules! doc {
(
$(#[$outer:meta])*
mod $i:ident {
$(#![$inner:meta])*
}
) =>
(
$(#[$outer])*
pub mod $i {
$(#![$inner])*
}
)
}
doc! {
/// Outer doc
mod Foo {
//! Inner doc
}
}
fn main() { }