Skip to content

Prove correctness for NonNull::read_unaligned #147

Answered by zhassan-aws
QinyuanWu asked this question in Q&A
Discussion options

You must be logged in to vote

The other issue in the harness is this line:

            let raw_result_ptr = result as *const u8;

The read_unaligned method returns the value, and so we need to get the address of it, i.e.:

            let raw_result_ptr = &result as *const usize as *const u8;

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@zhassan-aws
Comment options

Answer selected by QinyuanWu
Comment options

You must be logged in to vote
1 reply
@QinyuanWu
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants