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

Before you can "just do" a change to the borrow checker you have to be able to precisely describe how those new behaviours for the borrow checker actually work, how it interacts with the rest of the borrow checker's behaviour and how it doesn't lead to unsoundness problems. Otherwise, you might as well just not have a borrow checker.


Indeed. In the case of self-referential borrows, this is not allowed because Rust wants copying structures byte-for-byte (e.g. `memcpy`) to always be safe.

The solution was `Pin<T>` et. al., which gives a way to make some value immovable in memory.

An equivalent yet simpler version of this system could be integrated into the borrow checker (this was a proposed solution for Rust), but as I said before, it would not be backwards-compatible, hence the need for `Pin`.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: