]> git.lizzy.rs Git - rust.git/commitdiff
Emit fake borrows for all tests
authorMatthew Jasper <mjjasper1@gmail.com>
Wed, 3 Apr 2019 19:54:23 +0000 (20:54 +0100)
committerMatthew Jasper <mjjasper1@gmail.com>
Tue, 21 May 2019 18:37:38 +0000 (19:37 +0100)
I was incorrectly under the impression that this would only lead to
duplicates. See `mir-opt/match-arm-scope.rs` (upcomming commit) for a
case where we didn't emit a fake borrow of `items.1`.

src/librustc_mir/build/matches/mod.rs

index 091e39630d6cb87f9969b9a8d7d3b352b942f607..58ca35abcb123ddb5f8cbec5470d3e652b80325f 100644 (file)
@@ -870,7 +870,7 @@ fn match_candidates<'pat>(
             span,
             untested_candidates,
             join_block,
-            &mut None,
+            fake_borrows,
         )
     }