Skip to content

Add repr(transparent) to Reg struct #480

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

Merged
merged 1 commit into from
Nov 19, 2020

Conversation

couchand
Copy link
Contributor

To guarantee that the register has the proper layout so that the cast of an integer to a *const RegisterBlock is sound.

Note that this is necessary but not sufficient. The underlying VolatileCell also currently uses the default repr. There is an open issue and PR to address the concern.

To guarantee that the register has the proper layout so that the cast
of an integer to a *const RegisterBlock is sound.
@couchand couchand requested a review from a team as a code owner October 10, 2020 01:50
@rust-highfive
Copy link

r? @ryankurte

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-tools labels Oct 10, 2020
Copy link
Contributor

@therealprof therealprof left a comment

Choose a reason for hiding this comment

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

Sorry for the delay. Makes sense to me.

bors r+

@bors bors bot merged commit d6c668d into rust-embedded:master Nov 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-tools
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants