Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The silenced errors aren't guaranteed to be memory leaks or use after frees. There are some situations where memory is being handled properly, but the borrow checker isn't able to prove it.

One example might be a tree-like struct where a parent and child have references to each other. Even if everything is cleaned up properly, the borrow checker has no way to know that when the struct is created. Solving it requires unsafe at some point, usually through something like RefCell.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: