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

Fix intra-doc links for Self on cross-crate items and primitives #76467

Merged
merged 3 commits into from
Nov 30, 2020

Commits on Nov 29, 2020

  1. Fix intra-doc links for Self on primitives

    - Remove the difference between `parent_item` and `current_item`; these
      should never have been different.
    - Remove `current_item` from `resolve` and `variant_field` so that
      `Self` is only substituted in one place at the very start.
    - Resolve the current item as a `DefId`, not a `HirId`. This is what
      actually fixed the bug.
    
    Hacks:
    - `clean` uses `TypedefItem` when it _really_ should be
      `AssociatedTypeItem`. I tried fixing this without success and hacked
      around it instead (see comments)
    - This stringifies DefIds, then resolves them a second time. This is
      really silly and rustdoc should just use DefIds throughout. Fixing
      this is a larger task than I want to take on right now.
    jyn514 committed Nov 29, 2020
    Configuration menu
    Copy the full SHA
    6ab1f05 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    aa8c9b0 View commit details
    Browse the repository at this point in the history
  3. Add test for cross-crate Self

    jyn514 committed Nov 29, 2020
    Configuration menu
    Copy the full SHA
    2b17f02 View commit details
    Browse the repository at this point in the history