Re:Drogue Device – An async, no-alloc actor framework for em...
by Nullabillity on Thursday February 04, 2021 @05:39PM
(#26030613)
This looks pretty unsound.. :/
Getting a &'static mut T means that you're allowed to keep the reference around forever, beyond the scope of the call. To be sound that means that the calling function is never allowed to use the reference again, not even to drop it.
The only sound way to even get a &'static mut T would be to leak a heap allocation (which this library explicitly forbids itself from).
Getting a &'static mut T means that you're allowed to keep the reference around forever, beyond the scope of the call. To be sound that means that the calling function is never allowed to use the reference again, not even to drop it.
The only sound way to even get a &'static mut T would be to leak a heap allocation (which this library explicitly forbids itself from).