1 error[E0597]: `z` does not live long enough
2 --> $DIR/regions-escape-loop-via-vec.rs:7:22
5 | ^ borrowed value does not live long enough
8 | - `z` dropped here while still borrowed
10 | - borrowed value needs to live until here
12 error[E0503]: cannot use `x` because it was mutably borrowed
13 --> $DIR/regions-escape-loop-via-vec.rs:5:11
15 LL | let mut _y = vec![&mut x];
16 | - borrow of `x` occurs here
18 | ^ use of borrowed `x`
20 error[E0503]: cannot use `x` because it was mutably borrowed
21 --> $DIR/regions-escape-loop-via-vec.rs:6:13
23 LL | let mut _y = vec![&mut x];
24 | - borrow of `x` occurs here
27 | ^^^^^ use of borrowed `x`
29 error[E0506]: cannot assign to `x` because it is borrowed
30 --> $DIR/regions-escape-loop-via-vec.rs:9:9
32 LL | let mut _y = vec![&mut x];
33 | - borrow of `x` occurs here
36 | ^^^^^^ assignment to borrowed `x` occurs here
38 error: aborting due to 4 previous errors
40 Some errors have detailed explanations: E0503, E0506, E0597.
41 For more information about an error, try `rustc --explain E0503`.