Closed
Description
Representation of Rust references:
- Are
&T
and&mut T
guaranteed to be a pointer? - Must always be aligned, non-null
- Guaranteed to be ABI compatible with C pointer types ("in every way?")
- presuming that the referent is compatible, of course
Representation of raw pointers:
- Guaranteed to be ABI compatible with C pointer types
- presuming that the referent is compatible, of course
Other factors:
- Considerations for storing things in the low bits of pointers
- safe with raw pointers, not safe with references (from this comment)