Skip to content

Every Body should remember its MirSource #77427

Closed
@ecstatic-morse

Description

@ecstatic-morse

We have a type called MirSource that is needed for debug logging during the MIR transform pipeline. We always know the source when building a Body, but for some reason we drop it on the floor. It then gets recomputed in rustc_mir and passed around as a separate parameter. This is unergonomic and increases function signature complexity. We should store a MirSource as part of the Body instead.

cc @rust-lang/wg-mir-opt

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-MIRArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlC-cleanupCategory: PRs that clean code up or issues documenting cleanup.E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions