diff options
| author | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2020-08-15 00:00:00 +0000 |
|---|---|---|
| committer | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2020-08-15 00:00:00 +0000 |
| commit | 1fe2e2941d93da397c8ace5f410c0ab3dc5a3049 (patch) | |
| tree | d0dc222ef5e016c57c05e9bdc163adffa49e59ea /src/test/rustdoc-ui/coverage/json.rs | |
| parent | 4fae04968eccb8797000b5a42760005b35504136 (diff) | |
| download | rust-1fe2e2941d93da397c8ace5f410c0ab3dc5a3049.tar.gz rust-1fe2e2941d93da397c8ace5f410c0ab3dc5a3049.zip | |
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.
Diffstat (limited to 'src/test/rustdoc-ui/coverage/json.rs')
0 files changed, 0 insertions, 0 deletions
