diff options
| author | bors <bors@rust-lang.org> | 2015-11-14 09:55:32 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-11-14 09:55:32 +0000 |
| commit | 968e8bf2136138020932958f4f0a4c3990616f54 (patch) | |
| tree | 25eb1d311b796a0c8e01c974ce41790db8b97f49 | |
| parent | 929ca3cb51ccb1c47ac4a330f50d8ae8ded1ba06 (diff) | |
| parent | 4e74f9b874700c652e3fa768e08293b91a36ea34 (diff) | |
| download | rust-968e8bf2136138020932958f4f0a4c3990616f54.tar.gz rust-968e8bf2136138020932958f4f0a4c3990616f54.zip | |
Auto merge of #29819 - mdinger:block-comments, r=steveklabnik
These really aren't documented well at all. The fact that doc comments end on a `*/` is really weird. I'm not sure if this is a mistake or not though. None of the block comments are even mentioned in the [book nightly](http://doc.rust-lang.org/nightly/book/comments.html). Probably should be fixed.
| -rw-r--r-- | src/doc/reference.md | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/doc/reference.md b/src/doc/reference.md index 2ada86115b6..de9352a4275 100644 --- a/src/doc/reference.md +++ b/src/doc/reference.md @@ -99,13 +99,12 @@ Comments in Rust code follow the general C++ style of line (`//`) and block (`/* ... */`) comment forms. Nested block comments are supported. Line comments beginning with exactly _three_ slashes (`///`), and block -comments beginning with exactly one repeated asterisk in the block-open -sequence (`/**`), are interpreted as a special syntax for `doc` +comments (`/** ... */`), are interpreted as a special syntax for `doc` [attributes](#attributes). That is, they are equivalent to writing `#[doc="..."]` around the body of the comment, i.e., `/// Foo` turns into `#[doc="Foo"]`. -Line comments beginning with `//!` and block comments beginning with `/*!` are +Line comments beginning with `//!` and block comments `/*! ... !*/` are doc comments that apply to the parent of the comment, rather than the item that follows. That is, they are equivalent to writing `#![doc="..."]` around the body of the comment. `//!` comments are usually used to document |
