2024-11-20 04:30:35 +00:00
|
|
|
error: constant of non-structural type `Vec<u8>` in a pattern
|
2023-10-15 19:20:06 +08:00
|
|
|
--> $DIR/issue-115599.rs:5:12
|
|
|
|
|
|
|
2024-11-20 02:15:21 +00:00
|
|
|
LL | const CONST_STRING: String = String::new();
|
|
|
|
|
| -------------------------- constant defined here
|
|
|
|
|
...
|
2023-10-15 19:20:06 +08:00
|
|
|
LL | if let CONST_STRING = empty_str {}
|
2024-11-20 04:30:35 +00:00
|
|
|
| ^^^^^^^^^^^^ constant of non-structural type
|
|
|
|
|
--> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
|
|
|
|
|
|
|
|
|
|
|
= note: `Vec<u8>` must be annotated with `#[derive(PartialEq)]` to be usable in patterns
|
2023-10-15 19:20:06 +08:00
|
|
|
|
|
2023-09-26 09:39:41 +02:00
|
|
|
= note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
|
2023-10-15 19:20:06 +08:00
|
|
|
|
2023-11-21 15:44:16 +00:00
|
|
|
error: aborting due to 1 previous error
|
2023-10-15 19:20:06 +08:00
|
|
|
|