2024-11-20 04:15:37 +00:00
|
|
|
error: constant of non-structural type `EnumSet<Enum8>` in a pattern
|
2024-02-08 20:08:19 +01:00
|
|
|
--> $DIR/issue-72896-non-partial-eq-const.rs:19:9
|
2023-09-16 14:15:48 +02:00
|
|
|
|
|
2024-11-20 23:10:39 +00:00
|
|
|
LL | enum Enum8 { }
|
|
|
|
|
| ---------- must be annotated with `#[derive(PartialEq)]` to be usable in patterns
|
|
|
|
|
...
|
2024-11-20 02:15:21 +00:00
|
|
|
LL | const CONST_SET: EnumSet<Enum8> = EnumSet { __enumset_underlying: 3 };
|
|
|
|
|
| ------------------------------- constant defined here
|
|
|
|
|
...
|
2023-09-16 14:15:48 +02:00
|
|
|
LL | CONST_SET => { /* ok */ }
|
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
|
|
|
|