Nicholas Nethercote a6e09a19fc Streamline deriving on packed structs.
The current approach to field accesses in derived code:
- Normal case: `&self.0`
- In a packed struct that derives `Copy`: `&{self.0}`
- In a packed struct that doesn't derive `Copy`: `let Self(ref x) = *self`

The `let` pattern used in the third case is equivalent to the simpler
field access in the first case. This commit changes the third case to
use a field access.

The commit also combines two boolean arguments (`is_packed` and
`always_copy`) into a single field (`copy_fields`) earlier, to save
passing both around.
2022-11-21 14:07:39 +11:00
..
2022-09-27 13:31:52 +02:00
2022-11-16 09:41:28 +11:00
2022-08-17 08:10:56 +10:00
2022-10-23 10:09:44 +02:00
2022-07-29 15:52:15 +10:00
2022-09-20 11:57:58 +00:00
2022-07-29 15:52:15 +10:00