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

rustdoc: general cleanup #63639

Merged
merged 10 commits into from
Aug 27, 2019
Merged

Commits on Aug 26, 2019

  1. Configuration menu
    Copy the full SHA
    a77247a View commit details
    Browse the repository at this point in the history
  2. Move top-level Clean impl to function

    This allows us to pass it a `&mut DocContext` which will allow removal
    of RefCells, etc. in the following commits. It's also somewhat a unique
    Clean impl in that it previously ignored `self` (re-retriveing
    hir::Crate), which it no longer needs to do.
    Mark-Simulacrum committed Aug 26, 2019
    Configuration menu
    Copy the full SHA
    e2b6f4c View commit details
    Browse the repository at this point in the history
  3. Mutate DocContext from LibEmbargoVisitor and RustdocVisitor

    We have &mut access, so remove the RefCell borrowing
    Mark-Simulacrum committed Aug 26, 2019
    Configuration menu
    Copy the full SHA
    57d57c6 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    95f5698 View commit details
    Browse the repository at this point in the history
  5. Remove support for printing HRef in alternate mode

    The alternate mode merely prints out the passed in text which is largely
    useless (as the text can simply be directly printed).
    Mark-Simulacrum committed Aug 26, 2019
    Configuration menu
    Copy the full SHA
    0e079c2 View commit details
    Browse the repository at this point in the history
  6. Store only the current depth

    Previously we stored the entire current path which is a bit expensive
    and only ever accessed its length. This stores the length directly.
    Mark-Simulacrum committed Aug 26, 2019
    Configuration menu
    Copy the full SHA
    3307929 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    dafdfee View commit details
    Browse the repository at this point in the history

Commits on Aug 27, 2019

  1. Transition a few fmt::Display impls to functions

    This introduces a WithFormatter abstraction that permits one-time
    fmt::Display on an arbitrary closure, created via `display_fn`. This
    allows us to prevent allocation while still using functions instead of
    structs, which are a bit unwieldy to thread arguments through as they
    can't easily call each other (and are generally a bit opaque).
    
    The eventual goal here is likely to move us off of the formatting
    infrastructure entirely in favor of something more structured, but this
    is a good step to move us in that direction as it makes, for example,
    passing a context describing current state to the formatting impl much
    easier.
    Mark-Simulacrum committed Aug 27, 2019
    Configuration menu
    Copy the full SHA
    edfd555 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b3f0175 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b0fab96 View commit details
    Browse the repository at this point in the history