]> git.lizzy.rs Git - rust.git/commit
Auto merge of #29886 - michaelwoerister:mir-erase-regions, r=nikomatsakis
authorbors <bors@rust-lang.org>
Wed, 18 Nov 2015 18:06:30 +0000 (18:06 +0000)
committerbors <bors@rust-lang.org>
Wed, 18 Nov 2015 18:06:30 +0000 (18:06 +0000)
commit3c68f646e957065fe5fabd4af850abaa8c4ee0af
tree43913dee13ff252ec221ccc871849659872a720c
parent64a65692a2cef74246dd0dab7f534b33936b748a
parentc533902285787c3cd3abd911103d8d0280c3a011
Auto merge of #29886 - michaelwoerister:mir-erase-regions, 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 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