bors 871b595202 Auto merge of #111913 - oli-obk:valtrees2, r=lcnr
Only rewrite valtree-constants to patterns and keep other constants opaque

Now that we can reliably fall back to comparing constants with `PartialEq::eq` to the match scrutinee, we can

1. eagerly try to convert constants to valtrees
2. then deeply convert the valtree to a pattern
3. if the to-valtree conversion failed, create an "opaque constant" pattern.

This PR specifically avoids any behavioral changes or major cleanups. What we can now do as follow ups is

* move the two remaining call sites to `destructure_mir_constant` off that query
* make valtree to pattern conversion infallible
    * this needs to be done after careful analysis of the effects. There may be user visible changes from that.

based on https://github.com/rust-lang/rust/pull/111768
2023-05-31 16:36:51 +00:00
..
2023-04-17 16:09:18 -04:00
2023-05-29 17:15:48 +02:00
2023-05-29 17:15:48 +02:00
2023-05-17 12:18:55 +00:00
2023-05-15 20:27:12 +00:00
2023-05-25 17:40:46 +00:00
2023-05-15 20:27:12 +00:00
2023-03-13 18:22:55 +00:00
2023-04-21 02:14:02 -07:00
2023-05-29 13:46:10 +02:00
2023-05-15 20:27:12 +00:00
2023-05-29 17:15:48 +02:00
2023-04-10 22:02:52 +02:00