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

Dataflow/borrowck lifetime cleanups #130022

Merged
merged 7 commits into from
Sep 9, 2024

Commits on Sep 9, 2024

  1. Remove unnecessary lifetimes in dataflow structs.

    There are four related dataflow structs: `MaybeInitializedPlaces`,
    `MaybeUninitializedPlaces`, and `EverInitializedPlaces`,
    `DefinitelyInitializedPlaces`. They all have a `&Body` and a
    `&MoveData<'tcx>` field. The first three use different lifetimes for the
    two fields, but the last one uses the same lifetime for both.
    
    This commit changes the first three to use the same lifetime, removing
    the need for one of the lifetimes. Other structs that also lose a
    lifetime as a result of this are `LivenessContext`, `LivenessResults`,
    `InitializationData`.
    
    It then does similar things in various other structs.
    nnethercote committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    3fe7dd6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bed91f5 View commit details
    Browse the repository at this point in the history
  3. Remove unnecessary lifetime from OperandCollector.

    Also put the remaining lifetimes into the usual order.
    nnethercote committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    1aafeb2 View commit details
    Browse the repository at this point in the history
  4. Rename some lifetimes.

    Give them the names used in most places.
    nnethercote committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    28a6dc4 View commit details
    Browse the repository at this point in the history
  5. Remove Gatherer.

    It's a very thin wrapper that pairs `MoveDataBuilder` with a `Location`,
    and it has four lifetime arguments. This commit removes it by just
    adding a `Location` to `MoveDataBuilder`.
    nnethercote committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    dc62f07 View commit details
    Browse the repository at this point in the history
  6. Remove Elaborator.

    It's a trivial wrapper around `ElaborateDropsCtxt` that serves no
    apparent purpose.
    nnethercote committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    0b032f8 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    5c35027 View commit details
    Browse the repository at this point in the history