rustdoc book: mention inner doc attribute

This commit is contained in:
Justin Tracey 2025-12-06 11:16:14 -05:00 committed by GitHub
parent ba86c0460b
commit a3a041da11
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4,8 +4,8 @@ The `#[doc]` attribute lets you control various aspects of how `rustdoc` does
its job.
The most basic function of `#[doc]` is to handle the actual documentation
text. That is, `///` is syntax sugar for `#[doc]`. This means that these two
are the same:
text. That is, `///` is syntax sugar for `#[doc]` (as is `//!` for `#![doc]`).
This means that these two are the same:
```rust,no_run
/// This is a doc comment.