]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc/issue-23812.rs
Auto merge of #31700 - oli-obk:skip_double_ended, r=alexcrichton
[rust.git] / src / test / rustdoc / issue-23812.rs
1 // Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11 macro_rules! doc {
12     (#[$outer:meta] mod $i:ident { #![$inner:meta] }) =>
13     (
14         #[$outer]
15         pub mod $i {
16             #![$inner]
17         }
18     )
19 }
20
21 doc! {
22     /// Outer comment
23     mod Foo {
24         //! Inner comment
25     }
26 }
27
28 // @has issue_23812/Foo/index.html
29 // @has - 'Outer comment'
30 // @!has - '/// Outer comment'
31 // @has - 'Inner comment'
32 // @!has - '//! Inner comment'
33
34
35 doc! {
36     /** Outer block comment */
37     mod Bar {
38         /*! Inner block comment */
39     }
40 }
41
42 // @has issue_23812/Bar/index.html
43 // @has - 'Outer block comment'
44 // @!has - '/** Outer block comment */'
45 // @has - 'Inner block comment'
46 // @!has - '/*! Inner block comment */'