-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Merge Promoted
and Static
variants of mir::Place
#53848
Comments
I'm working on changing the representation of |
I'm interested on working on this when @csmoe's changes land. |
@oli-obk I would like to take this up. |
Cool! So I think the changes necessary are
|
rust/src/librustc_mir/transform/promote_consts.rs Lines 289 to 298 in aa97448
If i have to replace the |
the
DefId field that refers to the current function. Then you can access the field here
|
…oli-obk Merge `Promoted` and `Static` in `mir::Place` fixes rust-lang#53848
…oli-obk Merge `Promoted` and `Static` in `mir::Place` fixes rust-lang#53848
…oli-obk Merge `Promoted` and `Static` in `mir::Place` fixes rust-lang#53848
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
Static
variant), but modify theStatic
struct fields for theDefId
(update docs that theDefId
is the one of the containing function in case of a promoted) and additionally add anOption<Promoted>
field.The text was updated successfully, but these errors were encountered: