2024-11-20 04:15:37 +00:00
|
|
|
error: constant of non-structural type `&[O<B>]` in a pattern
|
2024-02-08 20:08:19 +01:00
|
|
|
--> $DIR/issue-65466.rs:14:9
|
2023-09-16 14:15:48 +02:00
|
|
|
|
|
2024-11-20 23:10:39 +00:00
|
|
|
LL | struct B;
|
|
|
|
|
| -------- must be annotated with `#[derive(PartialEq)]` to be usable in patterns
|
|
|
|
|
LL |
|
2024-11-20 02:15:21 +00:00
|
|
|
LL | const C: &[O<B>] = &[O::None];
|
|
|
|
|
| ---------------- constant defined here
|
|
|
|
|
...
|
2023-09-16 14:15:48 +02:00
|
|
|
LL | C => (),
|
2024-11-20 03:57:30 +00:00
|
|
|
| ^ constant of non-structural type
|
2024-11-20 06:49:13 +00:00
|
|
|
|
|
|
|
|
|
= note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
|
2023-09-16 14:15:48 +02:00
|
|
|
|
2024-02-08 20:08:19 +01:00
|
|
|
error: aborting due to 1 previous error
|
2023-09-16 14:15:48 +02:00
|
|
|
|