Skip to content

Commit 9863f2c

Browse files
committed
Rollup merge of rust-lang#24740 - mbrubeck:reference, r=steveklabnik
r? @steveklabnik
2 parents 5a61d43 + 4cab21c commit 9863f2c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/doc/reference.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,11 @@ sequence (`/**`), are interpreted as a special syntax for `doc`
149149
`#[doc="..."]` around the body of the comment (this includes the comment
150150
characters themselves, ie `/// Foo` turns into `#[doc="/// Foo"]`).
151151

152-
`//!` comments apply to the parent of the comment, rather than the item that
153-
follows. `//!` comments are usually used to display information on the crate
154-
index page.
152+
Line comments beginning with `//!` and block comments beginning with `/*!` are
153+
doc comments that apply to the parent of the comment, rather than the item
154+
that follows. That is, they are equivalent to writing `#![doc="..."]` around
155+
the body of the comment. `//!` comments are usually used to display
156+
information on the crate index page.
155157

156158
Non-doc comments are interpreted as a form of whitespace.
157159

0 commit comments

Comments
 (0)