Skip to content

Merge Promoted and Static variants of mir::Place #53848

Closed
@oli-obk

Description

@oli-obk

This would allow merging most of the code in

Promoted(ref promoted) => {

I suggest to create a single variant (Maybe just leave the Static variant), but modify the Static struct fields for the DefId (update docs that the DefId is the one of the containing function in case of a promoted) and additionally add an Option<Promoted> field.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-MIRArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlA-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)C-cleanupCategory: PRs that clean code up or issues documenting cleanup.E-help-wantedCall for participation: Help is requested to fix this issue.E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.S-blockedStatus: Blocked on something else such as an RFC or other implementation work.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions