]> git.lizzy.rs Git - rust.git/blob - tests/ui/nll/user-annotations/promoted-annotation.stderr
Auto merge of #105716 - chriswailes:ndk-update-redux, r=pietroalbini
[rust.git] / tests / ui / nll / user-annotations / promoted-annotation.stderr
1 error[E0597]: `x` does not live long enough
2   --> $DIR/promoted-annotation.rs:6:7
3    |
4 LL | fn foo<'a>() {
5    |        -- lifetime `'a` defined here
6 LL |     let x = 0;
7 LL |     let f = &drop::<&'a i32>;
8    |             ---------------- assignment requires that `x` is borrowed for `'a`
9 LL |     f(&x);
10    |       ^^ borrowed value does not live long enough
11 LL |
12 LL | }
13    | - `x` dropped here while still borrowed
14
15 error: aborting due to previous error
16
17 For more information about this error, try `rustc --explain E0597`.