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_borrowck memory management tweaks #131225

Merged
merged 5 commits into from
Oct 7, 2024

Commits on Oct 4, 2024

  1. Use Rc less in MirBorrowckCtxt.

    The `regioncx` and `borrow_set` fields can be references instead of
    `Rc`. They use the existing `'a` lifetime. This avoids some heap
    allocations and is a bit simpler.
    nnethercote committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    89e84c0 View commit details
    Browse the repository at this point in the history
  2. Use Box instead of Rc for polonius_output.

    Refcounting isn't needed.
    nnethercote committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    3d7fe9e View commit details
    Browse the repository at this point in the history
  3. Avoid Rc in BodyWithBorrowckFacts.

    It can own these two fields.
    nnethercote committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    d9975ce View commit details
    Browse the repository at this point in the history
  4. Avoid &Rc<T> arguments.

    Either `&T` or `Rc<T>` is preferable.
    nnethercote committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    56e849c View commit details
    Browse the repository at this point in the history
  5. Remove unnecessary lifetime in ConditionVisitor.

    By making it own two of its fields.
    nnethercote committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    c69d174 View commit details
    Browse the repository at this point in the history