Skip to content

Commit d4ca2ea

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 61ef8b3 commit d4ca2ea

File tree

1 file changed

+1
-1
lines changed
  • library/std/src/collections/hash

1 file changed

+1
-1
lines changed

library/std/src/collections/hash/map.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -819,7 +819,7 @@ where
819819
/// types that can be `==` without being identical. See the [module-level
820820
/// documentation] for more.
821821
///
822-
/// [module-level documentation]: crate::collections#insert-and-complex-keys
822+
/// [module-level documentation]: index.html#insert-and-complex-keys
823823
///
824824
/// # Examples
825825
///

0 commit comments

Comments
 (0)