Skip to content

Commit 75f66f7

Browse files
authored
Rollup merge of #148262 - JonathanBrouwer:dead-code-inference, r=nnethercote
Fix types being marked as dead when they are inferred generic arguments Previously usages of a type in a pattern were ignored. This is incorrect, since if the type is in a pattern we're clearly producing it in the expression we're matching against. I think this `in_pat` check was meant to be only for variants, which we should indeed ignore since we can just remove the match arm that matches the pattern. Please double check my logic here since this is my first time touching the dead-code pass and I'm not 100% sure this is what the `self.in_pat` check was for. Fixes rust-lang/rust#148144
2 parents 0229114 + 06a12a9 commit 75f66f7

File tree

0 file changed

+0
-0
lines changed

    0 file changed

    +0
    -0
    lines changed

    0 commit comments

    Comments
     (0)