]>
Commit | Line | Data |
---|---|---|
c1a9b12d SL |
1 | macro_rules! doc { |
2 | (#[$outer:meta] mod $i:ident { #![$inner:meta] }) => | |
3 | ( | |
4 | #[$outer] | |
5 | pub mod $i { | |
6 | #![$inner] | |
7 | } | |
8 | ) | |
9 | } | |
10 | ||
11 | doc! { | |
12 | /// Outer comment | |
13 | mod Foo { | |
14 | //! Inner comment | |
15 | } | |
16 | } | |
17 | ||
18 | // @has issue_23812/Foo/index.html | |
f2b60f7d FG |
19 | // @hasraw - 'Outer comment' |
20 | // @!hasraw - '/// Outer comment' | |
21 | // @hasraw - 'Inner comment' | |
22 | // @!hasraw - '//! Inner comment' | |
c1a9b12d SL |
23 | |
24 | ||
25 | doc! { | |
26 | /** Outer block comment */ | |
27 | mod Bar { | |
28 | /*! Inner block comment */ | |
29 | } | |
30 | } | |
31 | ||
32 | // @has issue_23812/Bar/index.html | |
f2b60f7d FG |
33 | // @hasraw - 'Outer block comment' |
34 | // @!hasraw - '/** Outer block comment */' | |
35 | // @hasraw - 'Inner block comment' | |
36 | // @!hasraw - '/*! Inner block comment */' |