3 ms·
It's not enforced in Rust, but it's automatic unless you actively prevent it from happening. So you could say it's an opt-out feature. std::mem::forget is cons
by tazjin 4y ago
It's not enforced in Rust, but it's automatic unless you actively prevent it from happening. So you could say it's an opt-out feature.
std::mem::forget is considered safe, as explained in its docs: https://doc.rust-lang.org/std/mem/fn.forget.html https://doc.rust-lang.org/std/mem/fn.forget.html
- jolux 4y agoFair enough, yeah.