Skip to content

Create a MutMirVisitor #81

Closed
rust-lang/rust
#138536

Description

@celinval

We currently provide a MirVisitor that allows users to visit the MIR of a function body, but without mutating it. It would be super helpful to provide a new version that allows body mutation.

The mutation would only be applied to the StableMIR body. But that can be quite handy if tools want to apply some transformations before running any analysis. For example, in Kani we instrument the code with extra checks before the analysis.

Activity

  1. makai410 commented on Mar 15, 2025

    @makai410
    Member

    @rustbot claim

  2. added a commit that references this issue on Mar 20, 2025
  3. added a commit that references this issue on Mar 21, 2025
  4. added 2 commits that reference this issue on Mar 21, 2025
  5. added a commit that references this issue on Mar 22, 2025
  6. added a commit that references this issue on Mar 22, 2025
  7. added a commit that references this issue on Mar 22, 2025
  8. tautschnig commented on Jul 29, 2025

    @tautschnig

    Shouldn't this be closed given rust-lang/rust#138536 has been merged?

  9. celinval commented on Jul 30, 2025

    @celinval
    ContributorAuthor

    Indeed! Thanks @tautschnig

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions