rust/tests/ui/macros/macro-doc-comments.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

27 lines
344 B
Rust
Raw Normal View History

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