2 ms·
Rust does not keep variables alive until references are gone. It checks to make sure that any reference lives as long as or shorter than its referent. If the re
by steveklabnik 2y ago
Rust does not keep variables alive until references are gone. It checks to make sure that any reference lives as long as or shorter than its referent. If the reference is longer lived than the referent, that’s a compile error.