rust/tests
bors 7e552b46af Auto merge of #140106 - dianne:deref-pat-usefulness, r=Nadrieril
allow deref patterns to participate in exhaustiveness analysis

Per [this proposal](https://hackmd.io/4qDDMcvyQ-GDB089IPcHGg#Exhaustiveness), this PR allows deref patterns to participate in exhaustiveness analysis. Currently all deref patterns enforce `DerefPure` bounds on their scrutinees, so this assumes all patterns it's analyzing are well-behaved. This also doesn't support [mixed exhaustiveness](https://hackmd.io/4qDDMcvyQ-GDB089IPcHGg#Mixed-exhaustiveness), and instead emits an error if deref patterns are used together with normal constructors. I think mixed exhaustiveness would be nice to have (especially if we eventually want to support arbitrary `Deref` impls[^1]), but it'd require more work to get reasonable diagnostics[^2].

Tracking issue for deref patterns: #87121

r? `@Nadrieril`

[^1]: Regardless of whether we support limited exhaustiveness checking for untrusted `Deref` or always require other arms to be exhaustive, I think it'd be useful to allow mixed matching for user-defined smart pointers. And it'd be strange if it worked there but not for `Cow`.

[^2]: I think listing out witnesses of non-exhaustiveness can be confusing when they're not necessarily disjoint, and when you only need to cover some of them, so we'd probably want special formatting and/or explanatory subdiagnostics. And if it's implemented similarly to unions, we'd probably also want some way of merging witnesses; the way witnesses for unions can appear duplicated is pretty unfortunate. I'm not sure yet how the diagnostics should look, especially for deeply nested patterns.
2025-05-08 02:16:45 +00:00
..
assembly Rollup merge of #140194 - jieyouxu:minicore-force-unwind-tables, r=bjorn3 2025-04-24 11:40:42 +02:00
auxiliary stabilize naked_functions 2025-04-20 11:18:38 +02:00
codegen Rollup merge of #140457 - fneddy:fix_s390x_codegen_const_vector, r=Mark-Simulacrum 2025-05-04 18:11:48 -04:00
codegen-units
coverage coverage: Only merge adjacent coverage spans 2025-05-06 20:42:25 +10:00
coverage-run-rustdoc Update coverage-run-rustdoc output 2025-03-28 10:35:53 +01:00
crashes Be a bit more relaxed about not yet constrained infer vars in closure upvar analysis 2025-05-05 19:06:45 +00:00
debuginfo Rollup merge of #138599 - adwinwhite:recursive-overflow, r=wesleywiser 2025-04-18 05:17:53 +02:00
incremental compiletest: Support matching on non-json lines in compiler output 2025-05-04 18:27:45 +03:00
mir-opt coverage: Only merge adjacent coverage spans 2025-05-06 20:42:25 +10:00
pretty Improve hir pretty-printing of attributes. 2025-05-03 12:46:48 +10:00
run-make Add regression test for #139899 2025-05-07 16:08:54 +02:00
rustdoc Created tests/rustdoc/async subfolder to limit number of files at the top level 2025-05-05 17:49:12 +02:00
rustdoc-gui Rollup merge of #140135 - GuillaumeGomez:sidebars-image, r=rustdoc 2025-05-06 14:50:45 +02:00
rustdoc-js rustdoc-search: add unbox flag to Result aliases 2025-04-11 11:36:40 -07:00
rustdoc-js-std Consistent trait bounds for ExtractIf Debug impls 2025-05-05 19:46:46 -07:00
rustdoc-json Improve hir pretty-printing of attributes. 2025-05-03 12:46:48 +10:00
rustdoc-ui rustdoc: remove unportable markdown lint and old parser 2025-05-06 10:33:04 -07:00
ui Auto merge of #140106 - dianne:deref-pat-usefulness, r=Nadrieril 2025-05-08 02:16:45 +00:00
ui-fulldeps Auto merge of #140453 - Zoxc:next-disambiguator, r=oli-obk 2025-05-05 11:50:43 +00:00
COMPILER_TESTS.md