]> git.lizzy.rs Git - rust.git/commitdiff
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)
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


No differences found