diff options
| author | Guillaume Gomez <guillaume.gomez@huawei.com> | 2021-10-28 14:44:47 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2021-10-29 21:27:44 +0200 |
| commit | 0c708311715befda3fcb7592f2324d96d9afeb74 (patch) | |
| tree | cc538c3bccee2df516f81cbc5c2918c445580a14 /src/doc/rustdoc | |
| parent | f2707fec04f655cdf18388618881748ebbd683e9 (diff) | |
| download | rust-0c708311715befda3fcb7592f2324d96d9afeb74.tar.gz rust-0c708311715befda3fcb7592f2324d96d9afeb74.zip | |
Unify titles in rustdoc book doc attributes chapter
Diffstat (limited to 'src/doc/rustdoc')
| -rw-r--r-- | src/doc/rustdoc/src/the-doc-attribute.md | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/doc/rustdoc/src/the-doc-attribute.md b/src/doc/rustdoc/src/the-doc-attribute.md index 5ee06c5f917..a75b6d38931 100644 --- a/src/doc/rustdoc/src/the-doc-attribute.md +++ b/src/doc/rustdoc/src/the-doc-attribute.md @@ -153,7 +153,9 @@ example, if you want your doctests to fail if they produce any warnings, you cou These forms of the `#[doc]` attribute are used on individual items, to control how they are documented. -### `#[doc(no_inline)]`/`#[doc(inline)]` +### `inline` and `no_inline` + +<span id="docno_inlinedocinline"></span> These attributes are used on `use` statements, and control where the documentation shows up. For example, consider this Rust code: @@ -219,7 +221,9 @@ Now we'll have a `Re-exports` line, and `Bar` will not link to anywhere. One special case: In Rust 2018 and later, if you `pub use` one of your dependencies, `rustdoc` will not eagerly inline it as a module unless you add `#[doc(inline)]`. -### `#[doc(hidden)]` +### `hidden` + +<span id="dochidden"></span> Any item annotated with `#[doc(hidden)]` will not appear in the documentation, unless the `strip-hidden` pass is removed. |
