mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-13 15:33:53 +00:00
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 (https://github.com/rust-lang/rust/issues/74481).
This commit is contained in:
parent
8437d7b1d3
commit
406584621a
@ -811,7 +811,7 @@ impl<K: Ord, V> BTreeMap<K, V> {
|
||||
/// types that can be `==` without being identical. See the [module-level
|
||||
/// documentation] for more.
|
||||
///
|
||||
/// [module-level documentation]: crate::collections#insert-and-complex-keys
|
||||
/// [module-level documentation]: index.html#insert-and-complex-keys
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user