summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc/mixing-doc-comments-and-attrs.rs
blob: 010058361faafa33e4a63feb9c9dff718dcd0865 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#![crate_name = "foo"]

// @has 'foo/struct.S1.html'
// @snapshot S1_top-doc - '//details[@class="toggle top-doc"]/div[@class="docblock"]'

#[doc = "Hello world!\n\n"]
/// Goodbye!
#[doc = "  Hello again!\n"]
pub struct S1;

// @has 'foo/struct.S2.html'
// @snapshot S2_top-doc - '//details[@class="toggle top-doc"]/div[@class="docblock"]'

/// Hello world!
///
#[doc = "Goodbye!"]
/// Hello again!
pub struct S2;

// @has 'foo/struct.S3.html'
// @snapshot S3_top-doc - '//details[@class="toggle top-doc"]/div[@class="docblock"]'
/** Par 1
*/ ///
/// Par 2
pub struct S3;