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

Move SanityCheck and MirPass #129926

Merged
merged 4 commits into from
Sep 5, 2024

Commits on Sep 3, 2024

  1. Adjust SanityCheck.

    The actual implementation remains in `rustc_mir_dataflow`, but this
    commit moves the `MirPass` impl to `rustc_mir_transform` and changes it
    to a `MirLint` (fixing a `FIXME` comment).
    
    (I originally tried moving the full implementation from
    `rustc_mir_dataflow` but I had some trait problems with `HasMoveData`
    and `RustcPeekAt` and `MaybeLiveLocals`. This commit was much smaller
    and simpler, but still will allow some follow-up cleanups.)
    nnethercote committed Sep 3, 2024
    Configuration menu
    Copy the full SHA
    5410900 View commit details
    Browse the repository at this point in the history
  2. Move MirPass to rustc_mir_transform.

    Because that's now the only crate that uses it.
    
    Moving stuff out of `rustc_middle` is always welcome.
    
    I chose to use `impl crate::MirPass`/`impl crate::MirLint` (with
    explicit `crate::`) everywhere because that's the only mention of
    `MirPass`/`MirLint` used in all of these files. (Prior to this change,
    `MirPass` was mostly imported via `use rustc_middle::mir::*` items.)
    nnethercote committed Sep 3, 2024
    Configuration menu
    Copy the full SHA
    2aae619 View commit details
    Browse the repository at this point in the history
  3. Reduce visibility of MirPass and related things.

    They're now all just used within this crate.
    nnethercote committed Sep 3, 2024
    Configuration menu
    Copy the full SHA
    827fa43 View commit details
    Browse the repository at this point in the history
  4. Clarify a comment.

    nnethercote committed Sep 3, 2024
    Configuration menu
    Copy the full SHA
    0b2b03c View commit details
    Browse the repository at this point in the history