Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emit explanatory note for move errors in packed struct derives #117511

Merged
merged 1 commit into from
Nov 7, 2023

Commits on Nov 3, 2023

  1. 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.
    gurry committed Nov 3, 2023
    Configuration menu
    Copy the full SHA
    4b3ece4 View commit details
    Browse the repository at this point in the history