rust/compiler/rustc_middle/src
bors cdd6374f16 Auto merge of #119218 - Nadrieril:nested-opaque-reveal, r=compiler-errors
Exhaustiveness: Reveal empty opaques in depth

Follow-up to https://github.com/rust-lang/rust/pull/116821. As noted [there](https://github.com/rust-lang/rust/pull/116821#discussion_r1376673420), 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`](https://github.com/rust-lang/rust/issues/51085)/[`min_exhaustive_patterns`](https://github.com/rust-lang/rust/pull/118803) features.

This PR fixes this behavior by adding `InhabitedPredicate::apply_reveal_opaque` that considers opaque types when determining inhabitedness.

r? `@compiler-errors`
2023-12-23 23:00:08 +00:00
..
dep_graph Reduce exposure of things. 2023-11-16 16:49:22 +11:00
hir resolve: Replace visibility table in resolver outputs with query feeding 2023-12-18 02:26:55 +03:00
hooks Rename hook. 2023-11-01 16:49:18 +00:00
infer NFC: do not clone types that are copy 2023-12-15 23:19:51 +01:00
middle Don't pass lint back out of lint decorator 2023-12-15 16:05:36 +00:00
mir Rollup merge of #119198 - compiler-errors:desugaring, r=eholk 2023-12-22 21:41:04 -05:00
query Replace some instances of FxHashMap/FxHashSet with stable alternatives (mostly in rustc_hir and rustc_ast_lowering) 2023-12-18 21:03:32 +01:00
thir Add never_patterns feature gate 2023-11-29 03:58:29 +01:00
traits Rollup merge of #119071 - lcnr:overflowo, r=compiler-errors 2023-12-20 09:46:11 +01:00
ty Auto merge of #119218 - Nadrieril:nested-opaque-reveal, r=compiler-errors 2023-12-23 23:00:08 +00:00
util Rename Session::span_diagnostic as Session::dcx. 2023-12-18 16:06:21 +11:00
arena.rs Make ConstKind and TyKind Copy 2023-12-12 01:09:12 +00:00
error.rs don't point at const usage site for resolution-time errors 2023-09-14 22:34:05 +02:00
lib.rs update cfg(bootstrap)s 2023-12-22 11:14:11 +01:00
lint.rs Streamline struct_lint_level. 2023-12-23 13:18:50 +11:00
macros.rs Rename HandlerInner::delay_span_bug as HandlerInner::span_delayed_bug. 2023-12-02 09:01:19 +11:00
metadata.rs rustc_metadata: Remove Span from ModChild 2023-04-18 17:25:04 +03:00
tests.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
thir.rs Don't include destruction scopes in THIR 2023-12-04 16:31:13 +00:00
values.rs Move some methods from tcx.hir() to tcx 2023-12-12 06:40:29 -08:00