]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/borrowck-vec-pattern-tail-element-loan.stderr
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
[rust.git] / tests / ui / borrowck / borrowck-vec-pattern-tail-element-loan.stderr
1 error[E0515]: cannot return value referencing local variable `vec`
2   --> $DIR/borrowck-vec-pattern-tail-element-loan.rs:8:5
3    |
4 LL |     let vec: &[isize] = &vec;
5    |                         ---- `vec` is borrowed here
6 ...
7 LL |     tail
8    |     ^^^^ returns a value referencing data owned by the current function
9
10 error: aborting due to previous error
11
12 For more information about this error, try `rustc --explain E0515`.