Commit 75f66f7
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#148144File tree
0 file changed
+0
-0
lines changed0 file changed
+0
-0
lines changed
0 commit comments