Esteban Küber
335d05aee5
Add additional context for non-sructural type constant used in pattern
...
- Point at type that should derive `PartialEq` to be structural.
- Point at manual `impl PartialEq`, explaining that it is not sufficient to be structural.
```
error: constant of non-structural type `MyType` in a pattern
--> $DIR/const-partial_eq-fallback-ice.rs:14:12
|
LL | struct MyType;
| ------------- `MyType` must be annotated with `#[derive(PartialEq)]` to be usable in patterns
...
LL | const CONSTANT: &&MyType = &&MyType;
| ------------------------ constant defined here
...
LL | if let CONSTANT = &&MyType {
| ^^^^^^^^ constant of non-structural type
|
note: the `PartialEq` trait must be derived, manual `impl`s are not sufficient; see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
--> $DIR/const-partial_eq-fallback-ice.rs:5:1
|
LL | impl PartialEq<usize> for MyType {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```
2024-12-04 20:29:36 +00:00
..
2024-09-24 13:45:58 +02:00
2024-07-26 14:41:56 -04:00
2024-04-20 16:04:06 +02:00
2024-07-04 02:02:21 +00:00
2024-11-22 11:12:15 -08:00
2024-12-04 20:29:36 +00:00
2024-09-23 02:12:53 +03:00
2024-09-23 02:12:53 +03:00
2024-06-13 06:16:12 +00:00
2024-06-13 06:16:12 +00:00
2024-05-20 19:55:59 -07:00
2024-05-20 19:55:59 -07:00
2024-02-16 20:02:50 +00:00
2024-03-03 13:10:15 +01:00
2024-03-03 13:10:15 +01:00
2024-05-20 19:55:59 -07:00
2024-11-23 08:57:25 -07:00
2024-02-16 20:02:50 +00:00
2024-05-20 19:55:59 -07:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-08-19 21:39:57 +02:00
2024-02-16 20:02:50 +00:00
2024-08-03 07:57:31 -04:00
2024-08-03 07:57:31 -04:00
2024-02-16 20:02:50 +00:00
2024-12-04 20:29:36 +00:00
2024-02-16 20:02:50 +00:00
2024-07-12 03:02:57 +00:00
2024-02-16 20:02:50 +00:00
2024-04-29 14:53:38 +02:00
2024-11-23 08:57:25 -07:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-12-04 20:29:36 +00:00
2024-12-04 20:29:36 +00:00
2024-02-16 20:02:50 +00:00
2024-06-13 06:14:32 +00:00
2024-06-13 06:14:32 +00:00
2024-05-15 16:55:54 -04:00
2024-04-15 23:27:22 -04:00
2024-11-22 11:12:15 -08:00
2024-03-27 11:20:28 -04:00
2024-07-04 02:02:21 +00:00
2024-05-15 17:20:18 -04:00
2024-03-22 20:53:42 -04:00
2024-03-22 20:53:42 -04:00
2024-03-22 20:53:42 -04:00
2024-05-20 19:55:59 -07:00
2024-05-20 19:55:59 -07:00
2024-05-20 19:55:59 -07:00
2024-05-20 19:55:59 -07:00
2024-12-04 20:29:36 +00:00
2024-02-16 20:02:50 +00:00
2024-12-04 20:29:36 +00:00
2024-02-16 20:02:50 +00:00
2024-03-19 12:28:23 +08:00
2024-03-19 12:28:23 +08:00
2024-07-04 05:36:34 +00:00
2024-03-19 12:28:23 +08:00
2024-03-19 12:28:23 +08:00
2024-07-04 05:36:34 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-07-12 03:02:57 +00:00
2024-11-23 08:57:25 -07:00
2024-06-25 10:00:30 +08:00
2024-08-26 18:30:15 -04:00
2024-05-02 19:42:31 -04:00
2024-07-12 03:02:57 +00:00
2024-02-16 20:02:50 +00:00
2024-11-21 18:40:36 +08:00
2024-11-21 18:40:36 +08:00
2024-02-16 20:02:50 +00:00
2024-11-22 11:12:15 -08:00
2024-11-22 11:12:15 -08:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-07-11 00:18:47 +08:00
2024-07-11 00:18:47 +08:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-06-13 06:14:32 +00:00
2024-06-13 06:14:32 +00:00