2024-11-20 04:30:35 +00:00
|
|
|
error: constant of non-structural type `CustomEq` in a pattern
|
2024-05-03 15:24:53 +02:00
|
|
|
--> $DIR/cross-crate-fail.rs:11:9
|
2020-04-07 13:01:41 -07:00
|
|
|
|
|
2020-04-28 14:30:44 -07:00
|
|
|
LL | consts::SOME => panic!(),
|
2024-11-20 04:30:35 +00:00
|
|
|
| ^^^^^^^^^^^^ constant of non-structural type
|
2023-03-27 10:14:08 -04:00
|
|
|
|
|
2024-11-20 04:30:35 +00:00
|
|
|
::: $DIR/auxiliary/consts.rs:1:1
|
2024-11-20 02:15:21 +00:00
|
|
|
|
|
2024-11-20 04:30:35 +00:00
|
|
|
LL | pub struct CustomEq;
|
|
|
|
|
| ------------------- `CustomEq` must be annotated with `#[derive(PartialEq)]` to be usable in patterns
|
|
|
|
|
...
|
2024-11-20 02:15:21 +00:00
|
|
|
LL | pub const SOME: Option<CustomEq> = Some(CustomEq);
|
|
|
|
|
| -------------------------------- constant defined here
|
|
|
|
|
|
|
2023-09-26 09:39:41 +02:00
|
|
|
= note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
|
2020-04-07 13:01:41 -07:00
|
|
|
|
2024-11-20 04:30:35 +00:00
|
|
|
error: constant of non-structural type `CustomEq` in a pattern
|
|
|
|
|
--> $DIR/cross-crate-fail.rs:17:9
|
2020-05-02 14:39:12 -07:00
|
|
|
|
|
|
|
|
|
LL | <Defaulted as consts::AssocConst>::SOME => panic!(),
|
2024-11-20 04:30:35 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant of non-structural type
|
2023-03-27 10:14:08 -04:00
|
|
|
|
|
2024-11-20 04:30:35 +00:00
|
|
|
::: $DIR/auxiliary/consts.rs:1:1
|
2024-11-20 02:15:21 +00:00
|
|
|
|
|
2024-11-20 04:30:35 +00:00
|
|
|
LL | pub struct CustomEq;
|
|
|
|
|
| ------------------- `CustomEq` must be annotated with `#[derive(PartialEq)]` to be usable in patterns
|
|
|
|
|
...
|
2024-11-20 02:15:21 +00:00
|
|
|
LL | const SOME: Option<CustomEq> = Some(CustomEq);
|
|
|
|
|
| ---------------------------- constant defined here
|
|
|
|
|
|
|
2023-09-26 09:39:41 +02:00
|
|
|
= note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
|
2020-05-02 14:39:12 -07:00
|
|
|
|
2020-09-23 17:03:31 +02:00
|
|
|
error: aborting due to 2 previous errors
|
2020-04-07 13:01:41 -07:00
|
|
|
|