Nicholas Nethercote
75e87d1f81
Fix syntax in -Zunpretty-expanded
output for derived PartialEq
.
...
If you do `derive(PartialEq)` on a packed struct, the output shown by
`-Zunpretty=expanded` includes expressions like this:
```
{ self.x } == { other.x }
```
This is invalid syntax. This doesn't break compilation, because the AST
nodes are constructed within the compiler. But it does mean anyone using
`-Zunpretty=expanded` output as a guide for hand-written impls could get
a nasty surprise.
This commit fixes things by instead using this form:
```
({ self.x }) == ({ other.x })
```
2023-02-01 15:14:05 +11:00
..
2023-01-15 19:46:20 +00:00
2023-01-11 21:30:32 +00:00
2023-01-26 07:53:26 +01:00
2023-01-27 20:10:17 +00:00
2023-01-26 12:44:47 +00:00
2023-01-11 22:25:49 -08:00
2023-01-15 19:46:20 +00:00
2023-01-26 15:02:20 +01:00
2023-01-17 02:52:43 +00:00
2023-01-15 19:46:20 +00:00
2023-01-12 22:25:30 +00:00
2023-01-15 19:46:20 +00:00
2023-01-15 22:17:54 +13:00
2023-01-19 20:20:58 +00:00
2023-01-25 22:19:52 +01:00
2023-01-15 19:46:20 +00:00
2023-01-19 11:29:40 +00:00
2023-01-28 10:00:56 +00:00
2023-01-29 04:11:27 +00:00
2023-01-18 04:07:39 +00:00
2023-01-16 11:09:53 +01:00
2023-01-30 12:00:42 +11:00
2023-02-01 15:14:05 +11:00
2023-01-11 21:40:39 +00:00
2023-01-11 21:30:32 +00:00
2023-01-17 02:52:43 +00:00
2023-01-15 19:46:20 +00:00
2023-01-17 03:09:49 +00:00
2023-01-27 04:04:22 +03:00
2023-01-16 18:33:25 +00:00
2023-01-17 03:06:38 +00:00
2023-01-28 15:08:07 +00:00
2023-01-29 20:19:26 +01:00
2023-01-26 05:07:34 +00:00
2023-01-11 14:40:02 -08:00
2023-01-12 22:04:30 +00:00
2023-01-27 22:01:12 +00:00
2023-01-25 22:19:52 +01:00
2023-01-15 12:23:46 +13:00
2023-01-28 20:52:01 +00:00
2023-01-15 19:46:20 +00:00
2023-01-17 03:09:49 +00:00
2023-01-27 20:10:17 +00:00
2023-01-15 19:46:20 +00:00
2023-01-28 10:00:56 +00:00
2023-01-18 22:53:27 +08:00
2023-01-15 19:46:20 +00:00
2023-01-23 10:35:21 +00:00
2023-01-25 22:19:52 +01:00
2023-01-13 05:47:23 +09:00
2023-01-11 22:25:49 -08:00
2023-01-11 14:35:08 -08:00
2023-01-23 20:33:04 -08:00
2023-01-25 22:19:52 +01:00
2023-01-18 04:45:43 +00:00
2023-01-27 20:10:17 +00:00
2023-01-26 12:44:47 +00:00
2023-01-12 20:44:47 +00:00
2023-01-17 02:52:43 +00:00
2023-01-23 10:07:10 +09:00
2023-01-27 00:54:31 +01:00
2023-01-19 19:35:49 +00:00
2023-01-17 03:09:49 +00:00
2023-01-13 20:50:34 +00:00
2023-01-28 20:43:16 +01:00
2023-01-15 19:46:20 +00:00
2023-01-13 05:04:48 +00:00
2023-01-17 02:52:43 +00:00
2023-01-11 21:39:07 +00:00
2023-01-11 14:40:02 -08:00
2023-01-12 22:25:30 +00:00
2023-01-30 14:22:41 +00:00
2023-01-26 15:02:20 +01:00
2023-01-11 14:09:14 -08:00
2023-01-11 21:36:02 +00:00
2023-01-26 06:15:23 +01:00
2023-01-11 14:40:07 -08:00
2023-01-25 22:19:54 +01:00
2023-01-13 19:16:42 +01:00
2023-01-15 19:46:20 +00:00
2023-01-17 03:06:38 +00:00
2023-01-13 16:54:23 +09:00
2023-01-23 20:33:04 -08:00
2023-01-13 16:54:24 +09:00
2023-01-25 22:19:52 +01:00
2023-01-20 20:16:37 +01:00
2023-01-26 07:53:21 +01:00
2023-01-17 03:06:38 +00:00
2023-01-16 21:06:34 +09:00
2023-01-17 02:52:43 +00:00
2023-01-12 22:25:30 +00:00
2023-01-14 22:04:42 +13:00
2023-01-25 22:19:52 +01:00
2023-01-19 21:09:25 +01:00
2023-01-28 05:20:18 +01:00
2023-01-27 18:58:44 +00:00
2023-01-19 21:09:25 +01:00
2023-01-17 03:06:38 +00:00
2023-01-27 22:13:55 +01:00
2023-01-12 22:25:30 +00:00
2023-01-29 10:20:25 +00:00
2023-01-12 22:04:30 +00:00
2023-01-15 19:46:20 +00:00
2023-01-23 14:47:00 +00:00
2023-01-26 15:02:19 +01:00
2023-01-28 11:11:05 +01:00
2023-01-14 13:04:26 +01:00
2023-01-15 19:46:20 +00:00
2023-01-11 14:40:07 -08:00
2023-01-17 03:06:38 +00:00
2023-01-12 22:25:30 +00:00
2023-01-27 04:04:22 +03:00
2023-01-19 19:35:49 +00:00
2023-01-15 19:46:20 +00:00
2023-01-15 19:46:20 +00:00
2023-01-12 02:28:38 +00:00
2023-01-16 20:24:01 +13:00
2023-01-24 14:02:56 -05:00
2023-01-15 19:46:20 +00:00