From: bors Date: Mon, 17 Aug 2020 18:33:24 +0000 (+0000) Subject: Auto merge of #74748 - simonvandel:simplify-discriminant-arm, r=wesleywiser X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=33c96b4d9782cf6364e47cb2c904e66b06c22bb4;p=rust.git Auto merge of #74748 - simonvandel:simplify-discriminant-arm, r=wesleywiser 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. --- 33c96b4d9782cf6364e47cb2c904e66b06c22bb4