1 error[E0597]: `vec` does not live long enough
2 --> $DIR/borrowck-vec-pattern-element-loan.rs:15:25
4 LL | let vec: &[isize] = &vec; //~ ERROR does not live long enough
5 | ^^^^ borrowed value does not live long enough
8 | - `vec` dropped here while still borrowed
10 note: borrowed value must be valid for the lifetime 'a as defined on the function body at 13:6...
11 --> $DIR/borrowck-vec-pattern-element-loan.rs:13:6
13 LL | fn a<'a>() -> &'a [isize] {
16 error[E0597]: `vec` does not live long enough
17 --> $DIR/borrowck-vec-pattern-element-loan.rs:25:25
19 LL | let vec: &[isize] = &vec; //~ ERROR does not live long enough
20 | ^^^^ borrowed value does not live long enough
23 | - `vec` dropped here while still borrowed
25 note: borrowed value must be valid for the lifetime 'a as defined on the function body at 23:6...
26 --> $DIR/borrowck-vec-pattern-element-loan.rs:23:6
28 LL | fn b<'a>() -> &'a [isize] {
31 error[E0597]: `vec` does not live long enough
32 --> $DIR/borrowck-vec-pattern-element-loan.rs:35:25
34 LL | let vec: &[isize] = &vec; //~ ERROR does not live long enough
35 | ^^^^ borrowed value does not live long enough
38 | - `vec` dropped here while still borrowed
40 note: borrowed value must be valid for the lifetime 'a as defined on the function body at 33:6...
41 --> $DIR/borrowck-vec-pattern-element-loan.rs:33:6
43 LL | fn c<'a>() -> &'a [isize] {
46 error: aborting due to 3 previous errors
48 For more information about this error, try `rustc --explain E0597`.