about summary refs log tree commit diff
path: root/compiler/rustc_feature/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-02-12 22:16:58 +0000
committerbors <bors@rust-lang.org>2024-02-12 22:16:58 +0000
commit74c3f5a146860c94ff4d179fc3bfa34f879adf41 (patch)
tree1b858766075942894e1611bb20073611e8992ae4 /compiler/rustc_feature/src
parentb381d3ab27f788f990551100c4425bb782d26d76 (diff)
parentbe29cd173a87a7d4a87ec6db62f26c3b7666d14a (diff)
downloadrust-74c3f5a146860c94ff4d179fc3bfa34f879adf41.tar.gz
rust-74c3f5a146860c94ff4d179fc3bfa34f879adf41.zip
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.
Diffstat (limited to 'compiler/rustc_feature/src')
0 files changed, 0 insertions, 0 deletions