3 ms·
> it's the only pointer allowed to that memory Not quite true with borrowing (i.e. & and &mut), which allows a temporary pointer to the memory to be created. U
by dbaupp 13y ago
> it's the only pointer allowed to that memory
Not quite true with borrowing (i.e. & and &mut), which allows a temporary pointer to the memory to be created. Unlike C++ however, the compiler makes sure all borrows are safe via a fairly intricate borrow checker, that guarantees (among other things) that the borrowed pointers don't outlive the original object. (i.e. no dangling references.)
- steveklabnik 13y agoAh! Yes. That's what I get for posting at 3am, thank you. :)