rust/compiler
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
..
rustc
rustc_abi
rustc_apfloat
rustc_arena
rustc_ast
rustc_ast_lowering Auto merge of #111235 - loongarch-rs:stabilize-asm, r=Amanieu 2023-05-29 13:31:53 +00:00
rustc_ast_passes
rustc_ast_pretty
rustc_attr
rustc_baked_icu_data
rustc_borrowck Auto merge of #112070 - lcnr:disjoint-closure-capture-ub, r=oli-obk 2023-05-31 00:24:39 +00:00
rustc_builtin_macros Auto merge of #111748 - nnethercote:Cow-DiagnosticMessage, r=WaffleLapkin 2023-05-29 07:10:44 +00:00
rustc_codegen_cranelift Rollup merge of #112060 - lcnr:early-binder, r=jackh726 2023-05-30 12:57:40 +02:00
rustc_codegen_gcc Auto merge of #111768 - oli-obk:pair_const_llvm, r=cjgillot 2023-05-30 10:31:10 +00:00
rustc_codegen_llvm Auto merge of #112102 - Nilstrieb:rollup-ivu1hmc, r=Nilstrieb 2023-05-30 13:25:42 +00:00
rustc_codegen_ssa Rollup merge of #112069 - clubby789:offset-of-sized-fields, r=WaffleLapkin 2023-05-31 07:07:01 +02:00
rustc_const_eval Auto merge of #111913 - oli-obk:valtrees2, r=lcnr 2023-05-31 16:36:51 +00:00
rustc_data_structures Auto merge of #111076 - notriddle:notriddle/silence-private-dep-trait-impl-suggestions, r=cjgillot 2023-05-31 13:47:36 +00:00
rustc_driver
rustc_driver_impl Use Cow in {D,Subd}iagnosticMessage. 2023-05-29 09:23:43 +10:00
rustc_error_codes Add details about unsafe_op_in_unsafe_fn to E0133 2023-05-28 13:11:30 +02:00
rustc_error_messages Use Cow in {D,Subd}iagnosticMessage. 2023-05-29 09:23:43 +10:00
rustc_errors Use Cow in {D,Subd}iagnosticMessage. 2023-05-29 09:23:43 +10:00
rustc_expand Use Cow in {D,Subd}iagnosticMessage. 2023-05-29 09:23:43 +10:00
rustc_feature Swap out CURRENT_RUSTC_VERSION to 1.71.0 2023-05-30 07:54:29 -04:00
rustc_fluent_macro
rustc_fs_util
rustc_graphviz
rustc_hir
rustc_hir_analysis Rollup merge of #112060 - lcnr:early-binder, r=jackh726 2023-05-30 12:57:40 +02:00
rustc_hir_pretty
rustc_hir_typeck Auto merge of #111881 - lcnr:leak-check, r=nikomatsakis,jackh726 2023-05-30 18:48:12 +00:00
rustc_incremental
rustc_index
rustc_infer change redundant clear() to assertion 2023-05-30 13:03:40 +02:00
rustc_interface
rustc_lexer
rustc_lint Rollup merge of #111543 - Urgau:uplift_invalid_utf8_in_unchecked, r=WaffleLapkin 2023-05-30 12:57:38 +02:00
rustc_lint_defs
rustc_llvm
rustc_log
rustc_macros
rustc_metadata Auto merge of #111913 - oli-obk:valtrees2, r=lcnr 2023-05-31 16:36:51 +00:00
rustc_middle Auto merge of #111913 - oli-obk:valtrees2, r=lcnr 2023-05-31 16:36:51 +00:00
rustc_mir_build Inline from_inline_const into its sole call site 2023-05-31 14:07:16 +00:00
rustc_mir_dataflow unique borrows are mutating uses 2023-05-29 17:15:48 +02:00
rustc_mir_transform Auto merge of #111913 - oli-obk:valtrees2, r=lcnr 2023-05-31 16:36:51 +00:00
rustc_monomorphize Rollup merge of #112053 - nnethercote:rm-Zcpu-partitioning-strategy, r=wesleywiser 2023-05-31 07:07:00 +02:00
rustc_parse Auto merge of #111748 - nnethercote:Cow-DiagnosticMessage, r=WaffleLapkin 2023-05-29 07:10:44 +00:00
rustc_parse_format
rustc_passes
rustc_plugin_impl
rustc_privacy
rustc_query_impl
rustc_query_system
rustc_resolve Use Cow in {D,Subd}iagnosticMessage. 2023-05-29 09:23:43 +10:00
rustc_serialize
rustc_session Rollup merge of #111975 - jyn514:normalization, r=cjgillot 2023-05-31 11:19:07 +02:00
rustc_smir
rustc_span Auto merge of #111913 - oli-obk:valtrees2, r=lcnr 2023-05-31 16:36:51 +00:00
rustc_symbol_mangling EarlyBinder::new -> EarlyBinder::bind 2023-05-29 13:46:10 +02:00
rustc_target Fix linkage for large binaries on mips64 platforms ... 2023-05-29 10:57:03 -06:00
rustc_trait_selection Auto merge of #111076 - notriddle:notriddle/silence-private-dep-trait-impl-suggestions, r=cjgillot 2023-05-31 13:47:36 +00:00
rustc_traits Rename tcx.mk_re_* => Region::new_* 2023-05-29 17:54:53 +00:00
rustc_transmute
rustc_ty_utils Rollup merge of #112060 - lcnr:early-binder, r=jackh726 2023-05-30 12:57:40 +02:00
rustc_type_ir