Rollup merge of #59585 - rust-lang:shallow-borrow-fixes, r=pnkfelix

Fixes for shallow borrows

* Don't promote these borrows if we're going to remove them before
  codegen
* Correctly mark unreachable code
This commit is contained in:
Mazdak Farrokhzad 2019-04-02 13:47:28 +02:00 committed by GitHub
commit 69bc687f20
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 9 deletions

View file

@ -70,8 +70,8 @@ fn main() {
// }
// bb8: { // binding1 and guard
// StorageLive(_6);
// _6 = &(((promoted[1]: std::option::Option<i32>) as Some).0: i32);
// _4 = &shallow (promoted[0]: std::option::Option<i32>);
// _6 = &(((promoted[0]: std::option::Option<i32>) as Some).0: i32);
// _4 = &shallow _2;
// StorageLive(_7);
// _7 = const guard() -> [return: bb9, unwind: bb1];
// }