@@ -197,6 +197,22 @@ issue][issue-include].
197
197
[ unstable-include ] : ../unstable-book/language-features/external-doc.html
198
198
[ issue-include ] : https://github.com/rust-lang/rust/issues/44732
199
199
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
+
200
216
## Unstable command-line arguments
201
217
202
218
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
374
390
allows ` rustdoc ` to be able to generate documentation for the compiler crates and the standard
375
391
library, as an equivalent command-line argument is provided to ` rustc ` when building those crates.
376
392
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
-
393
393
### ` --index-page ` : provide a top-level landing page for docs
394
394
395
395
This feature allows you to generate an index-page with a given markdown file. A good example of it
0 commit comments