From b5643f1a490d6aa5f90fc45fd92ac34d6e8a05d8 Mon Sep 17 00:00:00 2001 From: Matthew Jasper Date: Wed, 3 Apr 2019 20:54:23 +0100 Subject: [PATCH] Emit fake borrows for all tests 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librustc_mir/build/matches/mod.rs b/src/librustc_mir/build/matches/mod.rs index 091e39630d6..58ca35abcb1 100644 --- a/src/librustc_mir/build/matches/mod.rs +++ b/src/librustc_mir/build/matches/mod.rs @@ -870,7 +870,7 @@ fn match_candidates<'pat>( span, untested_candidates, join_block, - &mut None, + fake_borrows, ) } -- 2.44.0