error[E0597]: `y` does not live long enough --> $DIR/E0597.rs:18:17 | 18 | x.x = Some(&y); | ^ borrowed value does not live long enough 19 | //~^ `y` does not live long enough [E0597] 20 | } | - `y` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created error: aborting due to previous error If you want more information on this error, try using "rustc --explain E0597"