-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exhaustiveness: Reveal empty opaques in depth #119218
Conversation
compiler/rustc_middle/src/ty/inhabitedness/inhabited_predicate.rs
Outdated
Show resolved
Hide resolved
r=me |
db24eea
to
34307ab
Compare
@bors r=compiler-errors |
☀️ Test successful - checks-actions |
Finished benchmarking commit (cdd6374): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 670.739s -> 670.687s (-0.01%) |
Follow-up to #116821. As noted there, the current implementation doesn't detect emptiness of opaques when the opaque is nested inside a type. This doesn't matter for stable behavior (which ignores nested empty types anyway) but does matter for the
exhaustive_patterns
/min_exhaustive_patterns
features.This PR fixes this behavior by adding
InhabitedPredicate::apply_reveal_opaque
that considers opaque types when determining inhabitedness.r? @compiler-errors