9

Non null convenience ops by WaffleLapkin · Pull Request #117697 · rust-lang/rust...

 1 year ago
source link: https://github.com/rust-lang/rust/pull/117697
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Conversation

Member

Based on rust-lang/libs-team#251.

I went through all of the methods on *mut and added every method, which does not require additional safety conditions, to NonNull. (exceptions: guaranteed_eq, guaranteed_ne, with_metadata_of, it's unclear if they are useful here...)

I'm also not sure what types should the "second pointer parameter" be. *mut/*const might be more permissible, but given that NonNull doesn't coerce to them, it might also be annoying. For now I chose the "use NonNull everywhere" path, but I'm not sure it's the correct one...

I'm eepy, so I probably messed up somewhere while copying...

cc @scottmcm
r? libs-api

calebsander reacted with thumbs up emoji

Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK