Feature Request: Convert option-types to pointers


The pointer primitive has

unsafe fn as_ref<'a>(self) -> Option<&'a T>;

but the converse doesn’t seem to exist

fn from_ref(Option<&T>) -> *const T;

but I think it should. :slight_smile: Not sure what module it’d go in, though - std::ptr?

Is this even where feature requests go?


There’s some previous discussion in this rfc issue