]> git.lizzy.rs Git - rust.git/blob - src/test/ui/span/issue-23338-locals-die-before-temps-of-body.nll.stderr
Allow the linker to choose the LTO-plugin (which is useful when using LLD)
[rust.git] / src / test / ui / span / issue-23338-locals-die-before-temps-of-body.nll.stderr
1 error[E0597]: `y` does not live long enough
2   --> $DIR/issue-23338-locals-die-before-temps-of-body.rs:20:5
3    |
4 LL |     y.borrow().clone()
5    |     ^---------
6    |     |
7    |     borrowed value does not live long enough
8    |     borrow may end up in a temporary, created here
9 LL | }
10    | -
11    | |
12    | borrowed value only lives until here
13    | temporary later dropped here, potentially using the reference
14
15 error[E0597]: `y` does not live long enough
16   --> $DIR/issue-23338-locals-die-before-temps-of-body.rs:27:9
17    |
18 LL |         y.borrow().clone()
19    |         ^---------
20    |         |
21    |         borrowed value does not live long enough
22    |         borrow may end up in a temporary, created here
23 LL |     };
24    |     -- temporary later dropped here, potentially using the reference
25    |     |
26    |     borrowed value only lives until here
27
28 error: aborting due to 2 previous errors
29
30 For more information about this error, try `rustc --explain E0597`.