rust/compiler/rustc_mir_build/src
bors 9239760da8 Auto merge of #105750 - oli-obk:valtrees, r=lcnr
Always fall back to PartialEq when a constant in a pattern is not recursively structural-eq

Right now we destructure the constant as far as we can, but with this PR we just don't take it apart anymore. This is preparatory work for moving to always using valtrees, as these will just do a single conversion of the constant to a valtree at the start, and if that fails, fall back to `PartialEq`.

This removes a few cases where we emitted the `unreachable pattern` lint, because we stop looking into the constant deeply enough to detect that a constant is already covered by another pattern.

Previous work: https://github.com/rust-lang/rust/pull/70743

This is groundwork towards fixing https://github.com/rust-lang/rust/issues/83085 and https://github.com/rust-lang/rust/issues/105047
2023-05-16 13:10:24 +00:00
..
build Auto merge of #105750 - oli-obk:valtrees, r=lcnr 2023-05-16 13:10:24 +00:00
thir Document how constants as opaque patterns behave differently. 2023-05-16 09:45:56 +00:00
check_unsafety.rs Auto merge of #106934 - DrMeepster:offset_of, r=WaffleLapkin 2023-04-22 00:10:44 +00:00
errors.rs use matches! macro in more places 2023-04-16 12:08:30 +02:00
lib.rs Move expansion of query macros in rustc_middle to rustc_middle::query 2023-05-15 08:49:13 +02:00
lints.rs Rename Abort terminator to Terminate 2023-04-06 09:34:16 +01:00