Skip to content

Commit 2b64605

Browse files
Move doc_alias doc
1 parent 7f7d8fb commit 2b64605

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

src/doc/rustdoc/src/unstable-features.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,22 @@ issue][issue-include].
197197
[unstable-include]: ../unstable-book/language-features/external-doc.html
198198
[issue-include]: https://github.com/rust-lang/rust/issues/44732
199199

200+
### Add aliases for an item in documentation search
201+
202+
This feature allows you to add alias(es) to an item when using the `rustdoc` search through the
203+
`doc(alias)` attribute. Example:
204+
205+
```rust,no_run
206+
#![feature(doc_alias)]
207+
208+
#[doc(alias = "x")]
209+
#[doc(alias = "big")]
210+
pub struct BigX;
211+
```
212+
213+
Then, when looking for it through the `rustdoc` search, if you enter "x" or
214+
"big", search will show the `BigX` struct first.
215+
200216
## Unstable command-line arguments
201217

202218
These features are enabled by passing a command-line flag to Rustdoc, but the flags in question are
@@ -374,22 +390,6 @@ This is an internal flag intended for the standard library and compiler that app
374390
allows `rustdoc` to be able to generate documentation for the compiler crates and the standard
375391
library, as an equivalent command-line argument is provided to `rustc` when building those crates.
376392

377-
### `doc_alias` feature
378-
379-
This feature allows you to add alias(es) to an item when using the `rustdoc` search through the
380-
`doc(alias)` attribute. Example:
381-
382-
```rust,no_run
383-
#![feature(doc_alias)]
384-
385-
#[doc(alias = "x")]
386-
#[doc(alias = "big")]
387-
pub struct BigX;
388-
```
389-
390-
Then, when looking for it through the `rustdoc` search, if you enter "x" or
391-
"big", search will show the `BigX` struct first.
392-
393393
### `--index-page`: provide a top-level landing page for docs
394394

395395
This feature allows you to generate an index-page with a given markdown file. A good example of it

0 commit comments

Comments
 (0)