]> git.lizzy.rs Git - rust.git/commit
Auto merge of #61872 - matthewjasper:refactor-mir-drop-gen, r=nikomatsakis
authorbors <bors@rust-lang.org>
Wed, 26 Jun 2019 04:42:34 +0000 (04:42 +0000)
committerbors <bors@rust-lang.org>
Wed, 26 Jun 2019 04:42:34 +0000 (04:42 +0000)
commitd3e2cec29225a46298ec4ebf082f34ebd7cfeecf
treee89a27ae84c6a99867e0dcb1e46df2649d7e95f8
parentbdd4bda4d5fe7eb24a7209a6c0c968a54869d3b7
parent3131427784b2c9f906a50b290f7d3cc215d0c0e8
Auto merge of #61872 - matthewjasper:refactor-mir-drop-gen, r=nikomatsakis

Clean up MIR drop generation

* Don't assign twice to the destination of a `while` loop containing a `break` expression
* Use `as_temp` to evaluate statement expression
* Avoid consecutive `StorageLive`s for the condition of a `while` loop
* Unify `return`, `break` and `continue` handling, and move it to `scopes.rs`
* Make some of the `scopes.rs` internals private
* Don't use `Place`s that are always `Local`s in MIR drop generation

Closes #42371
Closes #61579
Closes #61731
Closes #61834
Closes #61910
Closes #62115