Skip to content
New issue

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

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

Already on GitHub? # to your account

Fixing future compiler error "unaligned_references" (82523) #82

Merged
merged 1 commit into from
Jul 18, 2021
Merged

Fixing future compiler error "unaligned_references" (82523) #82

merged 1 commit into from
Jul 18, 2021

Conversation

phip1611
Copy link
Collaborator

@phip1611 phip1611 commented Jul 17, 2021

Fixing a future compile error, that is currently a warning. More info: rust-lang/rust#82523

The fix with curly-syntax is quite simple. It creates a new copy of the values, iff the are copy. Easy solution.

}
f.debug_struct("VBEControlInfo")
.field("signature", &self.signature)
.field("version", &{self.version})
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this curly syntax creates a new copy, because the value itself is copy

@IsaacWoods
Copy link
Member

Thanks!

@IsaacWoods IsaacWoods merged commit 5204fe8 into rust-osdev:master Jul 18, 2021
@phip1611 phip1611 deleted the fixing-unaligned-references-warn-82523 branch August 6, 2021 13:09
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants