]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/borrowck-local-borrow-with-panic-outlives-fn.stderr
Auto merge of #107843 - bjorn3:sync_cg_clif-2023-02-09, r=bjorn3
[rust.git] / tests / ui / borrowck / borrowck-local-borrow-with-panic-outlives-fn.stderr
1 error[E0597]: `z.1` does not live long enough
2   --> $DIR/borrowck-local-borrow-with-panic-outlives-fn.rs:3:15
3    |
4 LL |     let mut z = (0, 0);
5    |         ----- binding `z` declared here
6 LL |     *x = Some(&mut z.1);
7    |     ----------^^^^^^^^-
8    |     |         |
9    |     |         borrowed value does not live long enough
10    |     assignment requires that `z.1` is borrowed for `'static`
11 ...
12 LL | }
13    | - `z.1` 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`.