-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Merge Promoted and Static variants of mir::Place #53848
Copy link
Copy link
Closed
Labels
A-MIRArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlArea: 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, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)C-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.E-help-wantedCall for participation: Help is requested to fix this issue.Call for participation: Help is requested to fix this issue.E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.Call for participation: Medium difficulty. Experience needed to fix: Intermediate.S-blockedStatus: Blocked on something else such as an RFC or other implementation work.Status: Blocked on something else such as an RFC or other implementation work.
Metadata
Metadata
Assignees
Labels
A-MIRArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlArea: 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, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)C-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.E-help-wantedCall for participation: Help is requested to fix this issue.Call for participation: Help is requested to fix this issue.E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.Call for participation: Medium difficulty. Experience needed to fix: Intermediate.S-blockedStatus: Blocked on something else such as an RFC or other implementation work.Status: Blocked on something else such as an RFC or other implementation work.
Type
Fields
Give feedbackNo fields configured for issues without a type.
This would allow merging most of the code in
rust/src/librustc_mir/interpret/place.rs
Line 470 in 1114ab6
I suggest to create a single variant (Maybe just leave the
Staticvariant), but modify theStaticstruct fields for theDefId(update docs that theDefIdis the one of the containing function in case of a promoted) and additionally add anOption<Promoted>field.