Skip to content

Commit 4065846

Browse files
committed
Use relative links instead of intra-doc links
Previously, `BTreeMap` tried to link to `crate::collections`, intending for the link to go to `std/collections/index.html`. But `BTreeMap` is defined in `alloc`, so after the fix in the previous commit, the links instead went to `alloc/collections/index.html`, which has almost no information. This changes it to link to `index.html`, which only works when viewing from `std::collections::BTreeMap`, the most common place to visit the docs. Fixing it to work from anywhere would require the docs for `std::collections` to be duplicated in `alloc::collections`, which in turn would require HashMap to be `alloc` for intra-doc links to work (#74481).
1 parent 8437d7b commit 4065846

File tree

1 file changed

+1
-1
lines changed
  • library/alloc/src/collections/btree

1 file changed

+1
-1
lines changed

library/alloc/src/collections/btree/map.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -811,7 +811,7 @@ impl<K: Ord, V> BTreeMap<K, V> {
811811
/// types that can be `==` without being identical. See the [module-level
812812
/// documentation] for more.
813813
///
814-
/// [module-level documentation]: crate::collections#insert-and-complex-keys
814+
/// [module-level documentation]: index.html#insert-and-complex-keys
815815
///
816816
/// # Examples
817817
///

0 commit comments

Comments
 (0)