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

rustc_mir_transform cleanups 3 #130175

Merged
merged 8 commits into from
Sep 10, 2024

Commits on Sep 9, 2024

  1. Improve comment formatting.

    By reflowing comment lines that are too long, and a few that are very
    short. Plus some other very minor formatting tweaks.
    nnethercote committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    8235af0 View commit details
    Browse the repository at this point in the history
  2. Inline and remove some functions.

    These are all functions with a single callsite, where having a separate
    function does nothing to help with readability. These changes make the
    code a little shorter and easier to read.
    nnethercote committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    48064d4 View commit details
    Browse the repository at this point in the history
  3. Clarify a comment.

    The "as" is equivalent to "because", but I originally read it more like
    "when", which was confusing.
    nnethercote committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    baa16d2 View commit details
    Browse the repository at this point in the history
  4. Add a useful comment.

    nnethercote committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    e26692d View commit details
    Browse the repository at this point in the history
  5. Add a useful comment about PromoteTemps.

    This was non-obvious to me.
    nnethercote committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    51e1c39 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    d1c55a3 View commit details
    Browse the repository at this point in the history
  7. Remove references from some structs.

    In all cases the struct can own the relevant thing instead of having a
    reference to it. This makes the code simpler, and in some cases removes
    a struct lifetime.
    nnethercote committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    7023402 View commit details
    Browse the repository at this point in the history
  8. Make check_live_drops into a MirLint.

    It's a thin wrapper around `check_live_drops`, but it's enough to fix
    the FIXME comment.
    nnethercote committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    8949b44 View commit details
    Browse the repository at this point in the history