Skip to content

Commit ae9681e

Browse files
Rollup merge of #91199 - camelid:test-mixing-docs, r=GuillaumeGomez
rustdoc: Add test for mixing doc comments and attrs This is a step toward adding more test coverage to make it easier to remove the distinction between collapsed and uncollapsed doc values.
2 parents 3bc8fc8 + 2e0bc33 commit ae9681e

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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;

0 commit comments

Comments
 (0)