From: Matthew Jasper Date: Wed, 3 Apr 2019 19:54:23 +0000 (+0100) Subject: Emit fake borrows for all tests X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=b5643f1a490d6aa5f90fc45fd92ac34d6e8a05d8;p=rust.git 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`. --- 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, ) }