]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/consts/const_in_pattern/custom-eq-branch-warn.rs
5 impl Eq
for CustomEq {}
6 impl PartialEq
for CustomEq
{
7 fn eq(&self, _
: &Self) -> bool
{
12 #[derive(PartialEq, Eq)]
19 // We know that `BAR_BAZ` will always be `Foo::Bar` and thus eligible for structural matching, but
20 // dataflow will be more conservative.
21 const BAR_BAZ
: Foo
= if 42 == 42 {
28 match Foo
::Qux(CustomEq
) {
30 //~^ WARN must be annotated with `#[derive(PartialEq, Eq)]`
31 //~| WARN this was previously accepted
32 //~| NOTE see issue #73448
33 //~| NOTE `#[warn(nontrivial_structural_match)]` on by default