From bbbefa3edc48cb1afd57f1d99bf418731be1ef8f Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Sat, 6 Mar 2021 21:59:01 +0100 Subject: Allow doc alias attributes to use both list and value --- src/doc/rustdoc/src/advanced-features.md | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/doc/rustdoc') diff --git a/src/doc/rustdoc/src/advanced-features.md b/src/doc/rustdoc/src/advanced-features.md index abdc2e4025d..6147bd0a97a 100644 --- a/src/doc/rustdoc/src/advanced-features.md +++ b/src/doc/rustdoc/src/advanced-features.md @@ -81,3 +81,10 @@ Then, when looking for it through the `rustdoc` search, if you enter "x" or "big", search will show the `BigX` struct first. There are some limitations on the doc alias names though: you can't use `"` or whitespace. + +You can add multiple aliases at the same time by using a list: + +```rust,no_run +#[doc(alias("x", "big"))] +pub struct BigX; +``` -- cgit 1.4.1-3-g733a5