3 ms·
Borrow checking happens quite late in the compilation process. It has to, because it can't know the lifetimes of the borrows until all the functions are resolve
by johncolanduoni 9y ago
Borrow checking happens quite late in the compilation process. It has to, because it can't know the lifetimes of the borrows until all the functions are resolved (borrows are allowed to leave the scope of the call via requirements imposed by functions, even to the point of being required to be static). If this choice was made for technical reasons, this is not why.
Considering how seriously Rust takes explicitness in general, I strongly suspect this was done purely for readability.