]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #74748 - simonvandel:simplify-discriminant-arm, r=wesleywiser
authorbors <bors@rust-lang.org>
Mon, 17 Aug 2020 18:33:24 +0000 (18:33 +0000)
committerbors <bors@rust-lang.org>
Mon, 17 Aug 2020 18:33:24 +0000 (18:33 +0000)
MIR-OPT: Make SimplifyBranchSame able to remove identity match with fieldless variant

Modifies SimplifyBranchSame so that it can see that the statements can be considered equal in the following example
`_0 = _1` and `discriminant(_0) = discriminant(0)` are considered equal if 0 is a fieldless variant of an enum.


Trivial merge