Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve crate in intra-doc links properly across crates #77253

Merged
merged 2 commits into from
Sep 29, 2020

Commits on Sep 27, 2020

  1. Configuration menu
    Copy the full SHA
    8437d7b View commit details
    Browse the repository at this point in the history
  2. 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
    (rust-lang#74481).
    jyn514 committed Sep 27, 2020
    Configuration menu
    Copy the full SHA
    4065846 View commit details
    Browse the repository at this point in the history