about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/errors.rs
diff options
context:
space:
mode:
authorGurinder Singh <frederick.the.fool@gmail.com>2023-11-03 07:32:10 +0530
committerGurinder Singh <frederick.the.fool@gmail.com>2023-11-03 07:32:10 +0530
commit4b3ece475d6e77465a30c8b53d7e1e9e861e4b79 (patch)
tree27e4c496d6eeae63e1797d63c50662f78a663125 /compiler/rustc_parse/src/errors.rs
parenta395214a3a88be976eec9256987d5eb6b3584bdc (diff)
downloadrust-4b3ece475d6e77465a30c8b53d7e1e9e861e4b79.tar.gz
rust-4b3ece475d6e77465a30c8b53d7e1e9e861e4b79.zip
Emit explanatory note for move errors in packed struct derives
Derive expansions for packed structs cause move errors because
they prefer copying over borrowing since borrowing the fields of a
packed struct can result in unaligned access and therefore undefined
behaviour.

This underlying cause of the errors, however, is not apparent
to the user. We add a diagnostic note here to remedy that.
Diffstat (limited to 'compiler/rustc_parse/src/errors.rs')
0 files changed, 0 insertions, 0 deletions