]> git.lizzy.rs Git - rust.git/commit - src/tools/clippy
Auto merge of #69676 - ecstatic-morse:fix-enum-discr-effect, r=oli-obk
authorbors <bors@rust-lang.org>
Sat, 7 Mar 2020 13:47:46 +0000 (13:47 +0000)
committerbors <bors@rust-lang.org>
Sat, 7 Mar 2020 13:47:46 +0000 (13:47 +0000)
commit823ff8cf1397a5772b1f6954b60576202bf91836
treee581676a29e21d98c04a886bad81988d8e7ef036
parenta03921701cdfe0b2c5422240f3ae370ab21069f1
parente82ec2315e5adb1c291c3702cd2ac1f46ecd0fcf
Auto merge of #69676 - ecstatic-morse:fix-enum-discr-effect, r=oli-obk

Pass correct place to `discriminant_switch_effect`

PR #69562, which fixed a bug that was causing clippy to ICE, mistakenly passed the place holding the *result* of `Rvalue::Discriminant` instead of the place holding its *operand* to `apply_discriminant_switch_effect` as the enum place. As a result, no effect was applied at all, and we lost the perf benefits from marking inactive enum variants as uninitialized.

**edit:** The regression test has been split into #69744.

r? @oli-obk