Skip to content

Commit 4cab21c

Browse files
committed
Also mention /*! doc comments.
1 parent 1b87837 commit 4cab21c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/doc/reference.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +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-
Line comments beginning with `//!` are doc comments that apply to the parent
153-
of the comment, rather than the item that follows. That is, they are
154-
equivalent to writing `#![doc="..."]` around the body of the comment. `//!`
155-
comments are usually used to display information on the crate 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.
156157

157158
Non-doc comments are interpreted as a form of whitespace.
158159

0 commit comments

Comments
 (0)