2018-08-08 07:28:26 -05:00
|
|
|
error[E0597]: `vec` does not live long enough
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/borrowck-vec-pattern-element-loan.rs:5:26
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | let vec: &[isize] = &vec; //~ ERROR does not live long enough
|
|
|
|
| ^^^ borrowed value does not live long enough
|
|
|
|
...
|
|
|
|
LL | }
|
|
|
|
| - borrowed value only lives until here
|
|
|
|
|
|
2018-12-25 09:56:47 -06:00
|
|
|
note: borrowed value must be valid for the lifetime 'a as defined on the function body at 3:6...
|
|
|
|
--> $DIR/borrowck-vec-pattern-element-loan.rs:3:6
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | fn a<'a>() -> &'a [isize] {
|
|
|
|
| ^^
|
|
|
|
|
|
|
|
error[E0597]: `vec` does not live long enough
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/borrowck-vec-pattern-element-loan.rs:15:26
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | let vec: &[isize] = &vec; //~ ERROR does not live long enough
|
|
|
|
| ^^^ borrowed value does not live long enough
|
|
|
|
...
|
|
|
|
LL | }
|
|
|
|
| - borrowed value only lives until here
|
|
|
|
|
|
2018-12-25 09:56:47 -06:00
|
|
|
note: borrowed value must be valid for the lifetime 'a as defined on the function body at 13:6...
|
|
|
|
--> $DIR/borrowck-vec-pattern-element-loan.rs:13:6
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | fn b<'a>() -> &'a [isize] {
|
|
|
|
| ^^
|
|
|
|
|
|
|
|
error[E0597]: `vec` does not live long enough
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/borrowck-vec-pattern-element-loan.rs:25:26
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | let vec: &[isize] = &vec; //~ ERROR does not live long enough
|
|
|
|
| ^^^ borrowed value does not live long enough
|
|
|
|
...
|
|
|
|
LL | }
|
|
|
|
| - borrowed value only lives until here
|
|
|
|
|
|
2018-12-25 09:56:47 -06:00
|
|
|
note: borrowed value must be valid for the lifetime 'a as defined on the function body at 23:6...
|
|
|
|
--> $DIR/borrowck-vec-pattern-element-loan.rs:23:6
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | fn c<'a>() -> &'a [isize] {
|
|
|
|
| ^^
|
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0597`.
|