Skip to content

Commit

Permalink
Auto merge of #120324 - Nadrieril:remove-interior-mutability, r=compi…
Browse files Browse the repository at this point in the history
…ler-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.
  • Loading branch information
bors committed Feb 12, 2024
2 parents 9f5775d + b1437e1 commit e63355a
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit e63355a

Please sign in to comment.