fork/rust

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

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

master
565 B18 linesraw
1error[E0597]: `x` does not live long enough
2  --> $DIR/promoted-annotation.rs:6:7
3   |
4LL | fn foo<'a>() {
5   |        -- lifetime `'a` defined here
6LL |     let x = 0;
7   |         - binding `x` declared here
8LL |     let f = &drop::<&'a i32>;
9   |             ---------------- assignment requires that `x` is borrowed for `'a`
10LL |     f(&x);
11   |       ^^ borrowed value does not live long enough
12LL |
13LL | }
14   | - `x` dropped here while still borrowed
15
16error: aborting due to previous error
17
18For more information about this error, try `rustc --explain E0597`.