3 ms·
> All unsafe lets you do is dereference pointers or call unsafe functions. And all those let you do is drop lifetimes and wave goodbye to the borrow checker. Y
by Buttons840 3y ago
> All unsafe lets you do is dereference pointers or call unsafe functions.
And all those let you do is drop lifetimes and wave goodbye to the borrow checker. You just have to be explicit about it.
(What I mean is, the borrow checker checks borrows, it checks references. In unsafe you can make a reference forget what it's referring to. Just change &'a T to &'static T, and then the borrow checker is doing nothing.)