]> git.proxmox.com Git - rustc.git/blob - src/doc/unstable-book/src/language-features/doc-alias.md
New upstream version 1.47.0+dfsg1
[rustc.git] / src / doc / unstable-book / src / language-features / doc-alias.md
1 # `doc_alias`
2
3 The tracking issue for this feature is: [#50146]
4
5 [#50146]: https://github.com/rust-lang/rust/issues/50146
6
7 ------------------------
8
9 You can add alias(es) to an item when using the `rustdoc` search through the
10 `doc(alias)` attribute. Example:
11
12 ```rust,no_run
13 #![feature(doc_alias)]
14
15 #[doc(alias = "x")]
16 #[doc(alias = "big")]
17 pub struct BigX;
18 ```
19
20 Then, when looking for it through the `rustdoc` search, if you enter "x" or
21 "big", search will show the `BigX` struct first.
22
23 Note that this feature is currently hidden behind the `feature(doc_alias)` gate.