diff --git a/library/alloc/src/collections/btree/map.rs b/library/alloc/src/collections/btree/map.rs index 783f88f026b8f..00da1ec70606a 100644 --- a/library/alloc/src/collections/btree/map.rs +++ b/library/alloc/src/collections/btree/map.rs @@ -139,6 +139,9 @@ pub(super) const MIN_LEN: usize = node::MIN_LEN_AFTER_SPLIT; /// ``` #[stable(feature = "rust1", since = "1.0.0")] #[cfg_attr(not(test), rustc_diagnostic_item = "BTreeMap")] +#[doc(alias = "associative array")] +#[doc(alias = "dict")] +#[doc(alias = "map")] pub struct BTreeMap { root: Option>, length: usize, diff --git a/library/alloc/src/collections/btree/set.rs b/library/alloc/src/collections/btree/set.rs index a331b8d8e4bbb..80c01a2980678 100644 --- a/library/alloc/src/collections/btree/set.rs +++ b/library/alloc/src/collections/btree/set.rs @@ -62,6 +62,7 @@ use super::Recover; #[derive(Hash, PartialEq, Eq, Ord, PartialOrd)] #[stable(feature = "rust1", since = "1.0.0")] #[cfg_attr(not(test), rustc_diagnostic_item = "BTreeSet")] +#[doc(alias = "set")] pub struct BTreeSet { map: BTreeMap, } diff --git a/library/alloc/src/vec/mod.rs b/library/alloc/src/vec/mod.rs index b1b2619428366..a0b4286e5537a 100644 --- a/library/alloc/src/vec/mod.rs +++ b/library/alloc/src/vec/mod.rs @@ -373,6 +373,7 @@ mod spec_extend; /// [`&`]: ../../std/primitive.reference.html #[stable(feature = "rust1", since = "1.0.0")] #[cfg_attr(not(test), rustc_diagnostic_item = "vec_type")] +#[doc(alias = "list")] pub struct Vec { buf: RawVec, len: usize, diff --git a/library/std/src/collections/hash/map.rs b/library/std/src/collections/hash/map.rs index 27f7191831d41..f7a00dee701f2 100644 --- a/library/std/src/collections/hash/map.rs +++ b/library/std/src/collections/hash/map.rs @@ -200,6 +200,9 @@ use crate::sys; #[cfg_attr(not(test), rustc_diagnostic_item = "hashmap_type")] #[stable(feature = "rust1", since = "1.0.0")] +#[doc(alias = "associative array")] +#[doc(alias = "dict")] +#[doc(alias = "map")] pub struct HashMap { base: base::HashMap, } diff --git a/library/std/src/collections/hash/set.rs b/library/std/src/collections/hash/set.rs index 912e975aa0a4c..0d251ad7becf0 100644 --- a/library/std/src/collections/hash/set.rs +++ b/library/std/src/collections/hash/set.rs @@ -110,6 +110,7 @@ use super::map::{map_try_reserve_error, RandomState}; /// [`Cell`]: crate::cell::Cell #[cfg_attr(not(test), rustc_diagnostic_item = "hashset_type")] #[stable(feature = "rust1", since = "1.0.0")] +#[doc(alias = "set")] pub struct HashSet { base: base::HashSet, }