summaryrefslogtreecommitdiffstats
path: root/tests/ui/macros/macro-doc-comments.rs
blob: fcc64cc0670de2023170fb0a2c3a5a5da8265a14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// 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() { }