]> git.lizzy.rs Git - rust.git/blob - tests/ui/nll/capture-ref-in-struct.stderr
Auto merge of #107843 - bjorn3:sync_cg_clif-2023-02-09, r=bjorn3
[rust.git] / tests / ui / nll / capture-ref-in-struct.stderr
1 error[E0597]: `y` does not live long enough
2   --> $DIR/capture-ref-in-struct.rs:18:16
3    |
4 LL |         let y = 22;
5    |             - binding `y` declared here
6 ...
7 LL |             y: &y,
8    |                ^^ borrowed value does not live long enough
9 ...
10 LL |     }
11    |     - `y` dropped here while still borrowed
12 LL |
13 LL |     deref(p);
14    |           - borrow later used here
15
16 error: aborting due to previous error
17
18 For more information about this error, try `rustc --explain E0597`.