2024-11-20 04:30:35 +00:00
|
|
|
error: constant of non-structural type `S` in a pattern
|
2020-09-23 15:52:37 +00:00
|
|
|
--> $DIR/match_ice.rs:11:9
|
2020-09-20 15:22:33 +00:00
|
|
|
|
|
2024-11-20 04:30:35 +00:00
|
|
|
LL | struct S;
|
|
|
|
| -------- `S` must be annotated with `#[derive(PartialEq)]` to be usable in patterns
|
|
|
|
...
|
2024-11-20 02:15:21 +00:00
|
|
|
LL | const C: &S = &S;
|
|
|
|
| ----------- constant defined here
|
|
|
|
LL | match C {
|
2020-09-23 15:52:37 +00:00
|
|
|
LL | C => {}
|
2024-11-20 04:30:35 +00:00
|
|
|
| ^ constant of non-structural type
|
2023-03-27 14:14:08 +00:00
|
|
|
|
|
2023-09-26 07:39:41 +00:00
|
|
|
= note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
|
2019-01-14 18:51:00 +00:00
|
|
|
|
2023-11-21 15:44:16 +00:00
|
|
|
error: aborting due to 1 previous error
|
2019-01-14 18:51:00 +00:00
|
|
|
|