Skip to content

Commit 58807b0

Browse files
committed
Mention doc comments.
1 parent 19f1c31 commit 58807b0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

doc/rust.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,13 @@ line_comment : "//" non_eol * ;
163163

164164
Comments in Rust code follow the general C++ style of line and block-comment forms,
165165
with no nesting of block-comment delimiters.
166-
Comments are interpreted as a form of whitespace.
166+
167+
Line comments beginning with _three_ slashes (`///`),
168+
and block comments beginning with a repeated asterisk in the block-open sequence (`/**`),
169+
are interpreted as a special syntax for `doc` [attributes](#attributes).
170+
That is, they are equivalent to writing `#[doc "..."]` around the comment's text.
171+
172+
Non-doc comments are interpreted as a form of whitespace.
167173

168174
## Whitespace
169175

0 commit comments

Comments
 (0)