]> git.lizzy.rs Git - rust.git/blob - tests/ui/nll/user-annotations/promoted-annotation.stderr
Rollup merge of #106946 - dtolnay:hashlinecolumn, r=m-ou-se
[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    |         - binding `x` declared here
8 LL |     let f = &drop::<&'a i32>;
9    |             ---------------- assignment requires that `x` is borrowed for `'a`
10 LL |     f(&x);
11    |       ^^ borrowed value does not live long enough
12 LL |
13 LL | }
14    | - `x` dropped here while still borrowed
15
16 error: aborting due to previous error
17
18 For more information about this error, try `rustc --explain E0597`.