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-08-19 21:39:57 +02:00
2024-08-10 12:07:17 +02:00
2024-08-10 12:07:17 +02:00
2024-08-10 12:07:17 +02:00
2024-11-16 05:01:52 +01:00
2024-11-16 05:01:52 +01: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-02-16 20:02:50 +00:00
2024-05-03 15:56:59 +02:00
2024-12-04 20:29:36 +00:00
2024-01-05 10:56:59 +00:00
2024-02-16 20:02:50 +00:00
2024-10-24 03:17:28 -04:00
2024-02-16 20:02:50 +00:00
2023-11-03 18:26:16 +01:00
2024-11-23 08:57:25 -07:00
2024-11-23 08:57:25 -07:00
2024-08-19 21:57:37 +02:00
2024-08-10 12:07:17 +02:00
2024-08-10 12:07:17 +02:00
2024-08-10 12:07:17 +02:00
2024-11-23 08:57:25 -07:00
2024-11-23 08:57:25 -07:00
2024-11-23 08:57:25 -07:00
2024-11-23 08:57:25 -07:00
2024-09-11 18:36:45 +02:00
2024-09-11 18:36:45 +02:00
2024-09-13 21:01:29 +02:00
2024-06-23 04:28:42 -05:00
2024-08-19 21:39:57 +02:00
2024-05-02 19:42:31 -04:00
2024-05-02 19:42:31 -04:00
2024-09-11 18:36:45 +02:00
2024-11-08 03:46:27 +00:00
2024-02-16 20:02:50 +00:00
2024-11-26 02:50:48 +08:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-22 03:25:15 +01:00
2023-11-26 00:14:14 +00:00
2023-11-24 19:15:52 +01:00
2024-08-19 21:39:57 +02:00
2024-08-19 21:39:57 +02:00
2024-08-19 21:39:57 +02:00
2023-11-24 19:15:52 +01:00
2024-08-19 21:39:57 +02:00
2024-02-16 20:02:50 +00:00
2024-08-19 21:39:57 +02:00
2024-11-23 08:57:25 -07:00
2023-11-02 03:19:19 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-01-05 10:00:59 +00:00
2024-08-19 21:39:57 +02: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
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2023-10-27 19:56:12 +02:00
2023-12-04 11:56:21 +01:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-03-03 13:10:15 +01:00
2024-01-07 22:13:08 +01:00
2024-01-13 12:46:58 -05:00
2024-01-10 14:50:48 +01:00
2024-01-13 12:46:58 -05:00
2024-11-17 23:40:00 +00:00
2024-08-19 21:39:57 +02:00
2024-08-19 21:39:57 +02:00
2023-11-22 03:25:15 +01:00
2024-08-10 12:07:17 +02:00
2024-02-13 16:45:29 +01:00
2024-08-10 12:07:17 +02:00
2024-08-10 12:07:17 +02:00
2024-08-19 21:39:57 +02:00
2023-11-24 19:15:52 +01:00
2024-08-19 21:39:57 +02:00
2024-08-19 21:39:57 +02:00
2024-11-26 02:50:48 +08:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-11-23 08:57:25 -07:00
2024-11-23 08:57:25 -07:00
2023-11-03 18:26:16 +01:00
2024-01-26 17:25:02 +01:00
2024-01-26 17:25:02 +01:00
2023-10-27 19:56:12 +02:00
2023-11-03 18:26:16 +01:00
2023-10-27 19:56:12 +02:00
2024-11-23 08:57:25 -07:00
2024-01-26 23:54:08 +08:00
2024-01-26 23:54:08 +08:00
2024-09-13 21:01:29 +02:00
2024-09-13 21:01:29 +02:00
2024-09-13 21:01:29 +02:00
2024-08-10 12:07:17 +02:00
2024-07-21 15:24:27 +02:00
2024-08-10 12:07:17 +02:00
2024-08-10 12:07:17 +02:00
2024-08-19 21:39:57 +02:00
2024-08-19 21:39:57 +02:00
2024-08-19 21:39:57 +02:00
2023-11-22 03:25:15 +01:00
2024-11-17 23:40:00 +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-10-24 03:17:28 -04:00
2024-02-16 20:02:50 +00:00
2023-11-03 18:26:16 +01:00
2023-11-24 19:15:52 +01:00
2024-08-19 21:39:57 +02:00
2024-08-19 21:39:57 +02:00
2023-11-24 19:15:52 +01:00
2024-08-10 12:07:17 +02:00
2024-04-01 00:01:46 +02:00
2024-04-01 00:01:46 +02:00
2024-02-16 20:02:50 +00:00
2024-10-24 03:17:28 -04:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00