9 ms·
Sad to see you being downvoted when you are correct, see [1] > forget is not marked as unsafe, because Rust's safety guarantees do not include a guarantee that
by DanWaterworth 8y ago
Sad to see you being downvoted when you are correct, see [1]
> forget is not marked as unsafe, because Rust's safety guarantees do not include a guarantee that destructors will always run.
This was a problem in Rust when scoped threads relied on destructors being run.
[1] https://doc.rust-lang.org/std/mem/fn.forget.html https://doc.rust-lang.org/std/mem/fn.forget.html