]> git.lizzy.rs Git - rust.git/blob - tests/pretty/doc-comments.rs
Rollup merge of #106958 - jyn514:labels, r=m-ou-se
[rust.git] / tests / pretty / doc-comments.rs
1 // compile-flags: --crate-type=lib
2
3 // pp-exact
4
5 // some single-line non-doc comment
6
7 /// some single line outer-docs
8 fn a() {}
9
10 fn b() {
11     //! some single line inner-docs
12 }
13
14 //////////////////////////////////
15 // some single-line non-doc comment preceded by a separator
16
17 //////////////////////////////////
18 /// some single-line outer-docs preceded by a separator
19 /// (and trailing whitespaces)
20 fn c() {}
21
22 /*
23  * some multi-line non-doc comment
24  */
25
26 /**
27  * some multi-line outer-docs
28  */
29 fn d() {}
30
31 fn e() {
32     /*!
33      * some multi-line inner-docs
34      */
35 }
36
37 /********************************/
38 /*
39  * some multi-line non-doc comment preceded by a separator
40  */
41
42 /********************************/
43 /**
44  * some multi-line outer-docs preceded by a separator
45  */
46 fn f() {}
47
48 #[doc = "unsugared outer doc-comments work also"]
49 fn g() {}
50
51 fn h() {
52     #![doc = "as do inner ones"]
53 }