error[E0597]: `x` does not live long enough --> src/main.rs:4:3 | 2 | let y = { | - borrow later stored here 3 | let x = String::from("Hello"); 4 | &x | ^^ borrowed value does not live long enough 5 | }; | - `x` dropped here while still borrowed For more information about this error, try `rustc --explain E0597`.