]> git.lizzy.rs Git - rust.git/blob - src/test/ui/regions/regions-free-region-ordering-caller1.nll.stderr
Fix a few tests with target-specific output
[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 |     let z: &'a & usize = &(&y);
5    |                           ^^^^ creates a temporary which is freed while still in use
6 ...
7 LL | }
8    | - temporary value is freed at the end of this statement
9    |
10 note: borrowed value must be valid for the lifetime 'a as defined on the function body at 15:10...
11   --> $DIR/regions-free-region-ordering-caller1.rs:15:10
12    |
13 LL | fn call1<'a>(x: &'a usize) {
14    |          ^^
15
16 error[E0597]: `y` does not live long enough
17   --> $DIR/regions-free-region-ordering-caller1.rs:19:27
18    |
19 LL |     let z: &'a & usize = &(&y);
20    |                           ^^^^ borrowed value does not live long enough
21 ...
22 LL | }
23    | - `y` dropped here while still borrowed
24    |
25 note: borrowed value must be valid for the lifetime 'a as defined on the function body at 15:10...
26   --> $DIR/regions-free-region-ordering-caller1.rs:15:10
27    |
28 LL | fn call1<'a>(x: &'a usize) {
29    |          ^^
30
31 error: aborting due to 2 previous errors
32
33 Some errors occurred: E0597, E0716.
34 For more information about an error, try `rustc --explain E0597`.