Skip to content

Conversation

burrbull
Copy link
Member

As 0 is not always correct value, write_with_zero can't be safe for all registers.

@burrbull burrbull requested a review from a team as a code owner April 14, 2021 05:06
@rust-highfive
Copy link

r? @reitermarkus

(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 Apr 14, 2021
@burrbull
Copy link
Member Author

r? @therealprof

@adamgreig
Copy link
Member

I agree, this seems a shame but it fits our current safety model. Please could you add a note to the changelog?

@therealprof
Copy link
Contributor

I agree, this seems a shame but it fits our current safety model. Please could you add a note to the changelog?

How about merging #500? 😉

@adamgreig
Copy link
Member

@burrbull maybe we could leave it safe if the reset value is 0 and not otherwise? or also if all fields are covered, the same way the register-level bits() becomes safe?

@burrbull
Copy link
Member Author

@burrbull maybe we could leave it safe if the reset value is 0 and not otherwise? or also if all fields are covered, the same way the register-level bits() becomes safe?

In this way we need to implement own write_with_zero on each register.

@therealprof
Copy link
Contributor

I think this is fine and makes sense.

@adamgreig Any objections to merging it?

@adamgreig
Copy link
Member

In this way we need to implement own write_with_zero on each register.

Oh, yea, you're right of course. Never mind.

@therealprof yep let's merge.

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.

Alright then.

bors r+

@bors bors bot merged commit 5f6898f into master Apr 16, 2021
@bors bors bot deleted the write-with-zero branch April 16, 2021 16:27
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.

5 participants