Introduction Lifetimes as the name says is how long references in Rust are active. fn main() { let r; { let x = 5; r = &x; } println!("r: {}", r); } Error: error[E0597]: `x` does not live long enough --> src/main.r...

Markdown supported Β· ββ΅ to post
No responses yet.