diff options
| author | bors <bors@rust-lang.org> | 2020-08-15 13:41:05 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-08-15 13:41:05 +0000 |
| commit | b9db927b68f4b2e9c3e648be35b412ac1839ec54 (patch) | |
| tree | b24c1420b4906c19a153d85e436029d31478ace5 /src/test/rustdoc-ui/coverage/json.rs | |
| parent | 80fb3f3139c7dee7f211964c6a0b3ccb04b83d5e (diff) | |
| parent | af9b9e4ec874c4bc5c771841d491e02d02d5636a (diff) | |
| download | rust-b9db927b68f4b2e9c3e648be35b412ac1839ec54.tar.gz rust-b9db927b68f4b2e9c3e648be35b412ac1839ec54.zip | |
Auto merge of #75537 - tmiasko:match-branch-simplify, r=oli-obk
MatchBranchSimplification: fix equal const bool assignments The match branch simplification is applied when target blocks contain statements that are either equal or perform a const bool assignment with different values to the same place. Previously, when constructing new statements, only statements from a single block had been examined. This lead to a misoptimization when statements are equal because the assign the *same* const bool value to the same place. Fix the issue by examining statements from both blocks when deciding on replacement. Additionally: * Copy discriminant instead of moving it since it might be necessary to use its value more than once. * Optimize when switching on copy operand Based on #75508. r? @oli-obk / @JulianKnodt
Diffstat (limited to 'src/test/rustdoc-ui/coverage/json.rs')
0 files changed, 0 insertions, 0 deletions
