rust/compiler/rustc_metadata/src
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
..
rmeta Auto merge of #111913 - oli-obk:valtrees2, r=lcnr 2023-05-31 16:36:51 +00:00
creader.rs Auto merge of #111076 - notriddle:notriddle/silence-private-dep-trait-impl-suggestions, r=cjgillot 2023-05-31 13:47:36 +00:00
dependency_format.rs Add unstable feature flags 2023-04-19 18:55:11 +00:00
errors.rs Restrict From<S> for {D,Subd}iagnosticMessage. 2023-05-03 08:44:39 +10:00
foreign_modules.rs Rename some OwnerId fields. 2022-10-29 20:28:38 +11:00
fs.rs Only compute the crate hash when necessary. 2023-03-08 09:30:22 +11:00
lib.rs Add rustc_fluent_macro to decouple fluent from rustc_macros 2023-04-18 18:56:22 +00:00
locator.rs Load only the header for crate_matches 2023-05-26 07:44:37 -05:00
native_libs.rs Rollup merge of #109677 - dpaoliello:rawdylib, r=michaelwoerister,wesleywiser 2023-05-06 09:09:30 +09:00