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-22 23:41:39 -05:00
2023-01-28 00:23:12 +09:00
2023-01-28 09:55:26 +00:00
2023-01-19 13:52:15 +01:00
2023-01-27 08:53:39 +01:00
2023-01-29 07:01:58 +00:00
2023-02-01 15:14:05 +11:00
2023-01-29 04:11:27 +00:00
2023-01-25 01:46:19 -05:00
2023-01-28 16:35:07 +02:00
2023-01-29 07:01:58 +00:00
2023-01-29 04:11:27 +00:00
2023-01-29 04:11:27 +00:00
2023-01-29 20:03:37 +01:00
2023-01-27 10:59:51 +01:00
2023-01-29 10:20:25 +00:00
2023-01-20 20:16:37 +01:00
2023-02-01 15:14:05 +11:00
2023-01-28 15:08:07 +00:00
2023-01-30 17:50:08 +01:00
2023-01-30 17:50:08 +01:00
2023-01-29 10:20:25 +00:00
2023-01-28 09:55:26 +00:00
2023-01-19 15:25:33 +00:00
2023-01-28 19:41:21 +00:00
2023-01-29 04:11:27 +00:00
2023-01-30 12:00:42 +11:00
2023-01-30 07:02:01 +00:00
2023-01-21 23:20:58 -05:00
2023-01-27 11:27:22 +00:00
2023-01-29 01:27:11 +00:00
2023-01-30 17:50:11 +01:00
2023-01-29 20:03:37 +01:00
2023-01-23 23:56:22 +00:00
2023-01-30 17:50:09 +01:00
2023-01-30 07:20:38 +02:00
2023-01-29 21:01:35 +09:00
2023-01-27 08:53:39 +01:00
2023-01-30 10:54:33 +00:00
2023-01-28 09:55:26 +00:00
2023-01-25 08:58:27 -05:00
2023-01-28 09:55:26 +00:00
2023-01-29 20:03:37 +01:00
2023-01-28 15:08:07 +00:00
2023-01-27 18:58:44 +00:00
2023-01-26 06:15:27 +01:00
2023-01-30 15:11:45 +05:30
2023-01-29 10:20:25 +00:00
2023-01-18 10:22:21 -08:00
2023-01-28 20:10:59 +00:00
2023-01-27 19:00:26 +00:00