]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc/issue-23812.rs
Auto merge of #107549 - Zoxc:rustc-shared, r=jyn514
[rust.git] / tests / rustdoc / issue-23812.rs
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
19 // @hasraw - 'Outer comment'
20 // @!hasraw - '/// Outer comment'
21 // @hasraw - 'Inner comment'
22 // @!hasraw - '//! Inner comment'
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
33 // @hasraw - 'Outer block comment'
34 // @!hasraw - '/** Outer block comment */'
35 // @hasraw - 'Inner block comment'
36 // @!hasraw - '/*! Inner block comment */'