2018-02-27 15:14:41 -06:00
|
|
|
error[E0597]: `*v.0` does not live long enough
|
|
|
|
--> $DIR/issue-31567.rs:22:26
|
|
|
|
|
|
|
|
|
LL | let s_inner: &'a S = &*v.0; //~ ERROR `*v.0` does not live long enough
|
|
|
|
| ^^^^^ borrowed value does not live long enough
|
|
|
|
LL | &s_inner.0
|
|
|
|
LL | }
|
2018-07-22 10:02:31 -05:00
|
|
|
| - `*v.0` dropped here while still borrowed
|
2018-02-27 15:14:41 -06:00
|
|
|
|
|
2018-06-27 19:41:15 -05:00
|
|
|
note: borrowed value must be valid for the lifetime 'a as defined on the function body at 21:17...
|
|
|
|
--> $DIR/issue-31567.rs:21:17
|
2018-02-27 15:14:41 -06:00
|
|
|
|
|
|
|
|
LL | fn get_dangling<'a>(v: VecWrapper<'a>) -> &'a u32 {
|
2018-06-27 19:41:15 -05:00
|
|
|
| ^^
|
2018-02-27 15:14:41 -06:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
2018-03-03 08:59:40 -06:00
|
|
|
For more information about this error, try `rustc --explain E0597`.
|