fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
578 B19 linesraw
1error[E0597]: `y` does not live long enough
2  --> $DIR/E0597.rs:8:16
3   |
4LL |     let y = 0;
5   |         - binding `y` declared here
6LL |     x.x = Some(&y);
7   |                ^^ borrowed value does not live long enough
8LL |
9LL | }
10   | -
11   | |
12   | `y` dropped here while still borrowed
13   | borrow might be used here, when `x` is dropped and runs the `Drop` code for type `Foo`
14   |
15   = note: values in a scope are dropped in the opposite order they are defined
16
17error: aborting due to previous error
18
19For more information about this error, try `rustc --explain E0597`.