]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/consts/const_in_pattern/no-eq-branch-fail.rs
1 #![warn(indirect_structural_match)]
11 // Even though any of these values can be compared structurally, we still disallow it in a pattern
12 // because `Foo` does not impl `PartialEq`.
13 const BAR_BAZ
: Foo
= if 42 == 42 {
20 match Foo
::Qux(NoEq
) {
22 //~^ ERROR must be annotated with `#[derive(PartialEq, Eq)]`
23 //~| ERROR must be annotated with `#[derive(PartialEq, Eq)]`