rust/tests/ui/consts/const_in_pattern/issue-65466.stderr

17 lines
505 B
Plaintext

error: constant of non-structural type `&[O<B>]` in a pattern
--> $DIR/issue-65466.rs:14:9
|
LL | struct B;
| -------- must be annotated with `#[derive(PartialEq)]` to be usable in patterns
LL |
LL | const C: &[O<B>] = &[O::None];
| ---------------- constant defined here
...
LL | C => (),
| ^ constant of non-structural type
|
= note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
error: aborting due to 1 previous error