]> git.lizzy.rs Git - rust.git/blob - src/test/ui/regions/regions-free-region-ordering-caller1.nll.stderr
Rollup merge of #55343 - Keruspe:remap-debuginfo-release, r=alexcrichton
[rust.git] / src / test / ui / regions / regions-free-region-ordering-caller1.nll.stderr
1 error[E0716]: temporary value dropped while borrowed
2   --> $DIR/regions-free-region-ordering-caller1.rs:19:27
3    |
4 LL | fn call1<'a>(x: &'a usize) {
5    |          -- lifetime `'a` defined here
6 ...
7 LL |     let z: &'a & usize = &(&y);
8    |            -----------    ^^^^ creates a temporary which is freed while still in use
9    |            |
10    |            type annotation requires that borrow lasts for `'a`
11 ...
12 LL | }
13    | - temporary value is freed at the end of this statement
14
15 error: aborting due to previous error
16
17 For more information about this error, try `rustc --explain E0716`.