2024-11-20 04:30:35 +00:00
|
|
|
error: constant of non-structural type `Cow<'_, str>` in a pattern
|
2024-05-03 15:24:53 +02:00
|
|
|
--> $DIR/issue-89088.rs:16:9
|
2024-01-27 14:22:56 +01:00
|
|
|
|
|
2024-11-20 02:15:21 +00:00
|
|
|
LL | const FOO: &A = &A::Field(Cow::Borrowed("foo"));
|
|
|
|
|
| ------------- constant defined here
|
|
|
|
|
...
|
2024-01-27 14:22:56 +01:00
|
|
|
LL | FOO => todo!(),
|
2024-11-20 04:30:35 +00:00
|
|
|
| ^^^ constant of non-structural type
|
|
|
|
|
--> $SRC_DIR/alloc/src/borrow.rs:LL:COL
|
|
|
|
|
|
|
|
|
|
|
= note: `Cow<'_, str>` must be annotated with `#[derive(PartialEq)]` to be usable in patterns
|
2024-01-27 14:22:56 +01:00
|
|
|
|
|
|
|
|
|
= note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
|
|
|
|
|
|
2024-05-03 15:24:53 +02:00
|
|
|
error: aborting due to 1 previous error
|
|
|
|
|
|