]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/borrowck-vec-pattern-tail-element-loan.stderr
Auto merge of #58981 - estebank:elseless-if, r=davidtwco
[rust.git] / src / test / ui / borrowck / borrowck-vec-pattern-tail-element-loan.stderr
1 error[E0597]: `vec` does not live long enough
2   --> $DIR/borrowck-vec-pattern-tail-element-loan.rs:5:26
3    |
4 LL |     let vec: &[isize] = &vec;
5    |                          ^^^ borrowed value does not live long enough
6 ...
7 LL | }
8    | - borrowed value only lives until here
9    |
10 note: borrowed value must be valid for the lifetime 'a as defined on the function body at 3:6...
11   --> $DIR/borrowck-vec-pattern-tail-element-loan.rs:3:6
12    |
13 LL | fn a<'a>() -> &'a isize {
14    |      ^^
15
16 error: aborting due to previous error
17
18 For more information about this error, try `rustc --explain E0597`.