-
Notifications
You must be signed in to change notification settings - Fork 145
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
Mark bits() as safe if a register has no reserved bits #666
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Emilgardis (or someone else) soon. Please see the contribution instructions for more information. |
@Rahix, you may be interested in this patch. |
|
You could reuse |
@burrbull Can you explain? |
svd2rust/src/generate/register.rs Line 972 in 2d79969
svd2rust/src/generate/register.rs Line 783 in 2d79969
|
OK, I will. |
I messed up. Moment. |
bors r+ |
Build failed: |
format and rebase, please |
If a register has no fields but its write constraints allow full range of values to be written, then mark bits() as safe. Replace match block with unsafety() function call.
bors r+ |
If a register has no fields but its write constraints allow full range of values to be written, then mark bits() as safe.