Skip to content

Commit 4e74f9b

Browse files
committed
Document block doc comments better
1 parent 3beb159 commit 4e74f9b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/doc/reference.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,12 @@ Comments in Rust code follow the general C++ style of line (`//`) and
9999
block (`/* ... */`) comment forms. Nested block comments are supported.
100100

101101
Line comments beginning with exactly _three_ slashes (`///`), and block
102-
comments beginning with exactly one repeated asterisk in the block-open
103-
sequence (`/**`), are interpreted as a special syntax for `doc`
102+
comments (`/** ... */`), are interpreted as a special syntax for `doc`
104103
[attributes](#attributes). That is, they are equivalent to writing
105104
`#[doc="..."]` around the body of the comment, i.e., `/// Foo` turns into
106105
`#[doc="Foo"]`.
107106

108-
Line comments beginning with `//!` and block comments beginning with `/*!` are
107+
Line comments beginning with `//!` and block comments `/*! ... !*/` are
109108
doc comments that apply to the parent of the comment, rather than the item
110109
that follows. That is, they are equivalent to writing `#![doc="..."]` around
111110
the body of the comment. `//!` comments are usually used to document

0 commit comments

Comments
 (0)