Add documentation for doc(attribute = "...") attribute
This commit is contained in:
parent
75cbd05d19
commit
38e8963b14
1 changed files with 18 additions and 1 deletions
|
|
@ -196,7 +196,7 @@ to enable.
|
|||
|
||||
### Document keywords
|
||||
|
||||
This is for Rust compiler internal use only.
|
||||
This is for internal use in the std library.
|
||||
|
||||
Rust keywords are documented in the standard library (look for `match` for example).
|
||||
|
||||
|
|
@ -211,6 +211,23 @@ To do so, the `#[doc(keyword = "...")]` attribute is used. Example:
|
|||
mod empty_mod {}
|
||||
```
|
||||
|
||||
### Document builtin attributes
|
||||
|
||||
This is for internal use in the std library.
|
||||
|
||||
Rust builtin attributes are documented in the standard library (look for `repr` for example).
|
||||
|
||||
To do so, the `#[doc(attribute = "...")]` attribute is used. Example:
|
||||
|
||||
```rust
|
||||
#![feature(rustdoc_internals)]
|
||||
#![allow(internal_features)]
|
||||
|
||||
/// Some documentation about the attribute.
|
||||
#[doc(attribute = "repr")]
|
||||
mod empty_mod {}
|
||||
```
|
||||
|
||||
### Use the Rust logo as the crate logo
|
||||
|
||||
This is for official Rust project use only.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue