]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc/mixing-doc-comments-and-attrs.rs
Rollup merge of #83791 - the8472:relax-zip-side-effect-guarantee, r=dtolnay
[rust.git] / src / test / rustdoc / mixing-doc-comments-and-attrs.rs
1 #![crate_name = "foo"]
2
3 // @has 'foo/struct.S1.html'
4 // @count - '//details[@class="rustdoc-toggle top-doc"]/div[@class="docblock"]/p' \
5 //     1
6 // @has - '//details[@class="rustdoc-toggle top-doc"]/div[@class="docblock"]/p[1]' \
7 //     'Hello world! Goodbye! Hello again!'
8
9 #[doc = "Hello world!\n\n"]
10 /// Goodbye!
11 #[doc = "  Hello again!\n"]
12 pub struct S1;
13
14 // @has 'foo/struct.S2.html'
15 // @count - '//details[@class="rustdoc-toggle top-doc"]/div[@class="docblock"]/p' \
16 //     2
17 // @has - '//details[@class="rustdoc-toggle top-doc"]/div[@class="docblock"]/p[1]' \
18 //     'Hello world!'
19 // @has - '//details[@class="rustdoc-toggle top-doc"]/div[@class="docblock"]/p[2]' \
20 //     'Goodbye! Hello again!'
21
22 /// Hello world!
23 ///
24 #[doc = "Goodbye!"]
25 /// Hello again!
26 pub struct S2;