]> git.proxmox.com Git - rustc.git/blame - src/test/pretty/doc-comments.rs
New upstream version 1.33.0+dfsg1
[rustc.git] / src / test / pretty / doc-comments.rs
CommitLineData
e9174d1e
SL
1// compile-flags: --crate-type=lib
2
223e47cc
LB
3// pp-exact
4
5// some single-line non-doc comment
6
7/// some single line outer-docs
8fn a() { }
9
10fn b() {
11 //! some single line inner-docs
12}
13
14//////////////////////////////////
15// some single-line non-doc comment preceded by a separator
16
970d7e83 17//////////////////////////////////
223e47cc
LB
18/// some single-line outer-docs preceded by a separator
19/// (and trailing whitespaces)
20fn c() { }
21
22/*
23 * some multi-line non-doc comment
24 */
25
26/**
27 * some multi-line outer-docs
28 */
29fn d() { }
30
31fn 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 */
46fn f() { }
47
48#[doc = "unsugared outer doc-comments work also"]
49fn g() { }
50
51fn h() {
1a4d82fc 52 #![doc = "as do inner ones"]
223e47cc 53}