Skip to content
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

Add to_bits and from_bits to ptr::NonNull as well #93978

Closed
wants to merge 1 commit into from

Conversation

scottmcm
Copy link
Member

These also make sense on NonNull, especially for the future when it'll be able to use T: Thin instead of T: Sized.

Same tracking issue, #91126. I'll update the OP there if this PR is accepted.

Context: https://rust-lang.zulipchat.com/#narrow/stream/213817-t-lang/topic/.600.20as.20*const.20Extern.60/near/271761716

These also make sense on `NonNull`, especially for the future when it'll be able to use `T: Thin` instead of `T: Sized`.
@rust-highfive
Copy link
Collaborator

r? @m-ou-se

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 13, 2022
@the8472 the8472 added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Feb 14, 2022
@m-ou-se
Copy link
Member

m-ou-se commented Mar 9, 2022

Does we have any guarantee that a null pointer is always represented as 0usize in Rust?

@m-ou-se m-ou-se added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 9, 2022
@scottmcm
Copy link
Member Author

I'll close this because it should probably change to work like the strict provenance APIs, now that that work has happened.

@scottmcm scottmcm closed this Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants