]> git.lizzy.rs Git - rust.git/commit
MatchBranchSimplification: copy discriminant instead of moving it
authorTomasz Miąsko <tomasz.miasko@gmail.com>
Fri, 14 Aug 2020 00:00:00 +0000 (00:00 +0000)
committerTomasz Miąsko <tomasz.miasko@gmail.com>
Fri, 14 Aug 2020 20:21:56 +0000 (22:21 +0200)
commit4fae04968eccb8797000b5a42760005b35504136
tree9b958512960a05e7232487fe765e9f84e2c4863e
parent60d7d28948c1a3d5125f12a2254f6edb5077c4c9
MatchBranchSimplification: copy discriminant instead of moving it

It might be necessary to use its value more than once.
src/librustc_mir/transform/match_branches.rs
src/test/mir-opt/matches_reduce_branches.foo.MatchBranchSimplification.diff.32bit
src/test/mir-opt/matches_reduce_branches.foo.MatchBranchSimplification.diff.64bit