Skip to content

Commit 3a2f267

Browse files
committed
Auto merge of #148034 - dianqk:matchbr-copy, r=cjgillot
Simplify the canonical enum clone branches to a copy statement I have overhauled MatchBranchSimplification in this PR. This pass tries to unify statements one by one, which is more readable and extensible. This PR also unifies the following pattern that is mostly generated by GVN into one basic block that contains the copy statement: ```rust match a { Foo::A(_) => *a, Foo::B => Foo::B } ``` Fixes rust-lang/rust#128081.
2 parents 4673fcf + 30addec commit 3a2f267

0 file changed

File tree

    0 commit comments

    Comments
     (0)