Repository navigation
Challenge proposal: NonNull - #52
Conversation
zhassan-aws
left a comment
There was a problem hiding this comment.
Thanks @tautschnig. It seems to me that memory safety for the most of the listed functions would directly follow from their pre-conditions. Thus, I suggest we add the verification of at least one of the modules that use NonNull to this challenge, so that we can verify that the pre-conditions are not too overconstraining. One such module is Unique.
What do you think?
I get your concern - but then contracts (and harnesses) for |
…`NonNull::read_unaligned` (#156) Towards #52 Contracts & Harnesses for `NonNull::read`, `NonNull::read_volatile`, `NonNull::read_unaligned` ### Discussion For the ensures clause in the contract for `NonNull::read`, I could not directly compare the value pointed by self and result due to unsized and lack of PartialEq implementation, and the comparison is currently moved to the harness. ### Verification Successful verification: ``` SUMMARY: ** 0 of 141 failed VERIFICATION:- SUCCESSFUL Verification Time: 0.1760525s Complete - 5 successfully verified harnesses, 0 failures, 5 total. ``` By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses. --------- Co-authored-by: Zyad Hassan <[email protected]>
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.