-
Notifications
You must be signed in to change notification settings - Fork 13.3k
MIR: Add pass that erases all regions right before trans #29886
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
Conversation
Yes.
Yes. |
Actually, thinking more on this, can we move this pass to later? (Vs doing it in a separate PR) It seems like we can easily modify the driver to pass an |
r+ if the nit about |
086342a
to
0ce26db
Compare
I've moved region cleaning to |
@bors r+ |
📌 Commit 0ce26db has been approved by |
⌛ Testing commit 0ce26db with merge 716a00d... |
💔 Test failed - auto-mac-64-opt |
0ce26db
to
c533902
Compare
@bors r=nikomatsakis |
📌 Commit c533902 has been approved by |
…akis This change adds a `MirPass` erasing all early-bound regions from MIR, right before storing it in the MIR map. I've added some assertions at neuralgic points in `trans::mir` doing cheap checks whether region have actually been erased. Here are some assumptions that I worked under: - AdtDef references stay untouched. It's the `Substs` accompanying them that need to be handled (e.g. in `AggregateKind::Adt`). - We can't really get rid of late-bound regions at this point because there is no version `BareFnTy` (for example) that comes without one. These still have to be handled on demand in trans. Are this assumptions right? r? @nikomatsakis
This change adds a
MirPass
erasing all early-bound regions from MIR, right before storing it in the MIR map. I've added some assertions at neuralgic points intrans::mir
doing cheap checks whether region have actually been erased.Here are some assumptions that I worked under:
Substs
accompanying them that need to be handled (e.g. inAggregateKind::Adt
).BareFnTy
(for example) that comes without one. These still have to be handled on demand in trans.Are this assumptions right?
r? @nikomatsakis