Auto merge of #120324 - Nadrieril:remove-interior-mutability, r=compiler-errors

pattern_analysis: track usefulness without interior mutability

Because of or-patterns, exhaustiveness needs to be able to lint if a sub-pattern is redundant, e.g. in `Some(_) | Some(true)`. So far the only sane solution I had found was interior mutability. This is a bit of an abstraction leak, and would become a footgun if we ever reused the same `DeconstructedPat`. This PR replaces interior mutability with an address-indexed hashmap, which is logically equivalent.
This commit is contained in:
bors 2024-02-12 22:16:58 +00:00
commit c652f0bd8e

Diff content is not available