]> git.lizzy.rs Git - rust.git/blob - tests/ui/nll/issue-68550.stderr
Auto merge of #107843 - bjorn3:sync_cg_clif-2023-02-09, r=bjorn3
[rust.git] / tests / ui / nll / issue-68550.stderr
1 error[E0597]: `x` does not live long enough
2   --> $DIR/issue-68550.rs:12:20
3    |
4 LL | fn run<'a, A>(x: A)
5    |        --     - binding `x` declared here
6    |        |
7    |        lifetime `'a` defined here
8 ...
9 LL |     let _: &'a A = &x;
10    |            -----   ^^ borrowed value does not live long enough
11    |            |
12    |            type annotation requires that `x` is borrowed for `'a`
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`.