about summary refs log tree commit diff
path: root/src/doc/rustdoc
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2018-04-21 22:41:08 +0200
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2018-04-22 00:30:48 +0200
commit1ed3e77b8a254fd9cbf8f922d1f910d375a9d1e4 (patch)
treef03d45f27b41121e4dcbf654b15ff18e2f7f22fc /src/doc/rustdoc
parent48ab422be4cbc3ab4eb5d3456c2b92ccfe9d7f8d (diff)
downloadrust-1ed3e77b8a254fd9cbf8f922d1f910d375a9d1e4.tar.gz
rust-1ed3e77b8a254fd9cbf8f922d1f910d375a9d1e4.zip
Add doc about doc alias feature
Diffstat (limited to 'src/doc/rustdoc')
-rw-r--r--src/doc/rustdoc/src/unstable-features.md16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/doc/rustdoc/src/unstable-features.md b/src/doc/rustdoc/src/unstable-features.md
index bf97fb46861..7f110d6a3d2 100644
--- a/src/doc/rustdoc/src/unstable-features.md
+++ b/src/doc/rustdoc/src/unstable-features.md
@@ -373,3 +373,19 @@ This is an internal flag intended for the standard library and compiler that app
 `#[unstable]` attribute to any dependent crate that doesn't have another stability attribute. This
 allows `rustdoc` to be able to generate documentation for the compiler crates and the standard
 library, as an equivalent command-line argument is provided to `rustc` when building those crates.
+
+### `doc_alias` feature
+
+This feature allows you to add alias(es) to an item when using the `rustdoc` search through the
+`doc(alias)` attribute. Example:
+
+```rust,no_run
+#![feature(doc_alias)]
+
+#[doc(alias = "x")]
+#[doc(alias = "big")]
+pub struct BigX;
+```
+
+Then, when looking for it through the `rustdoc` search, if you enter "x" or
+"big", search will show the `BigX` struct first.